🐛 修复洪水修饰器导致角色卡片命令无法调用的问题

This commit is contained in:
洛水居室 2022-09-10 00:06:10 +08:00
parent 65f9f03479
commit 6e5a803896
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -39,7 +39,7 @@ class PlayerCards(Plugin, BasePlugin):
@handler(CommandHandler, command="player_card", block=False)
@handler(MessageHandler, filters=filters.Regex("^角色卡片查询(.*)"), block=False)
@restricts(filters.ChatType.GROUPS, restricts_time=20, try_delete_message=True)
@restricts()
@restricts(filters.ChatType.PRIVATE)
@error_callable
async def player_cards(self, update: Update, context: CallbackContext) -> None:
user = update.effective_user
@ -116,8 +116,8 @@ class PlayerCards(Plugin, BasePlugin):
await message.reply_photo(pnd_data, filename=f"player_card_{uid}_{character_name}.png")
@handler(CallbackQueryHandler, pattern=r"^get_player_card\|", block=False)
@restricts(filters.ChatType.GROUPS, restricts_time=20, try_delete_message=True)
@restricts()
@restricts(filters.ChatType.GROUPS, restricts_time=3)
@restricts(filters.ChatType.PRIVATE)
async def get_player_cards(self, update: Update, _: CallbackContext) -> None:
callback_query = update.callback_query
user = callback_query.from_user