diff --git a/plugins/genshin/player_cards.py b/plugins/genshin/player_cards.py index a739aeb9..c6f08ac7 100644 --- a/plugins/genshin/player_cards.py +++ b/plugins/genshin/player_cards.py @@ -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