diff --git a/GenshinUID/__init__.py b/GenshinUID/__init__.py index 1a315770..00c53d78 100644 --- a/GenshinUID/__init__.py +++ b/GenshinUID/__init__.py @@ -168,12 +168,12 @@ async def get_notice_message(bot: Bot, ev: Event): logger.debug('[gsuid] 不支持该 Telegram 事件...') return elif bot.adapter.get_name() == 'Discord': + from nonebot.adapters.discord import MessageComponentInteractionEvent from nonebot.adapters.discord.api import ( ChannelType, InteractionResponse, InteractionCallbackType, ) - from nonebot.adapters.discord import MessageComponentInteractionEvent sender = {} if isinstance(ev, MessageComponentInteractionEvent): diff --git a/GenshinUID/client.py b/GenshinUID/client.py index 750b16fb..1fcad5f7 100644 --- a/GenshinUID/client.py +++ b/GenshinUID/client.py @@ -377,7 +377,10 @@ def _bt(button: Dict): action = button['action'] if action == -1: action = 2 - + enter = None + if action == 1: + action = 2 + enter = True return Button( render_data=RenderData( label=button['text'], @@ -391,6 +394,7 @@ def _bt(button: Dict): specify_role_ids=button['specify_role_ids'], specify_user_ids=button['specify_user_ids'], ), + enter=enter, unsupport_tips=button['unsupport_tips'], data=button['data'], ),