💥 提高 get_player_cards 函数洪水防御标准

This commit is contained in:
洛水居室 2022-09-10 00:31:06 +08:00
parent 35630e280a
commit d6b38a0e63
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -122,8 +122,8 @@ class PlayerCards(Plugin, BasePlugin):
await message.reply_photo(pnd_data, filename=f"player_card_{uid}_{character_name}.png") await message.reply_photo(pnd_data, filename=f"player_card_{uid}_{character_name}.png")
@handler(CallbackQueryHandler, pattern=r"^get_player_card\|", block=False) @handler(CallbackQueryHandler, pattern=r"^get_player_card\|", block=False)
@restricts(filters.ChatType.GROUPS, restricts_time=3) @restricts(filters.ChatType.GROUPS, restricts_time=6)
@restricts(filters.ChatType.PRIVATE) @restricts(filters.ChatType.PRIVATE, restricts_time=6)
async def get_player_cards(self, update: Update, _: CallbackContext) -> None: async def get_player_cards(self, update: Update, _: CallbackContext) -> None:
callback_query = update.callback_query callback_query = update.callback_query
user = callback_query.from_user user = callback_query.from_user