🎨 Update Map Plugin

This commit is contained in:
洛水居室 2023-02-22 14:38:28 +08:00
parent 346e78481f
commit 0d1388d8ae
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -140,10 +140,15 @@ class Map(Plugin, BasePlugin):
return return
logger.info("用户: %s [%s] 使用 map 命令查询了 %s", user.username, user.id, resource_name) logger.info("用户: %s [%s] 使用 map 命令查询了 %s", user.username, user.id, resource_name)
if resource_name not in self.map_helper.query_map: if resource_name not in self.map_helper.query_map:
# 消息来源于群组中并且无法找到默认不回复即可
if filters.ChatType.GROUPS.filter(message) and group_dict is not None:
return
await message.reply_text("没有找到该资源。", parse_mode="Markdown") await message.reply_text("没有找到该资源。", parse_mode="Markdown")
return return
maps = self.get_show_map(resource_name) maps = self.get_show_map(resource_name)
if len(maps) == 0: if len(maps) == 0:
if filters.ChatType.GROUPS.filter(message) and group_dict is not None:
return
await message.reply_text("没有找到该资源。", parse_mode="Markdown") await message.reply_text("没有找到该资源。", parse_mode="Markdown")
return return
if len(maps) == 1: if len(maps) == 1: