From b79caf0e761e527c136cd4ee9ab56274554a39bc Mon Sep 17 00:00:00 2001 From: felinae98 <731499577@qq.com> Date: Tue, 16 Feb 2021 18:45:30 +0800 Subject: [PATCH] fix bug --- src/plugins/hk_reporter/config_manager.py | 2 +- src/plugins/hk_reporter/platform/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/hk_reporter/config_manager.py b/src/plugins/hk_reporter/config_manager.py index 0fe2f71..02e253e 100644 --- a/src/plugins/hk_reporter/config_manager.py +++ b/src/plugins/hk_reporter/config_manager.py @@ -13,7 +13,7 @@ from .send import send_msgs add_sub = on_command("添加订阅", rule=to_me(), permission=GROUP_ADMIN | GROUP_OWNER | SUPERUSER, priority=5) @add_sub.got('platform', '请输入想要订阅的平台,目前支持:{}'.format(', '.join(platform_manager.keys()))) -@add_sub.got('id', '请输入订阅用户的id,详情查阅https://github.com/felinae98/nonebot-hk-reporter') +# @add_sub.got('id', '请输入订阅用户的id,详情查阅https://github.com/felinae98/nonebot-hk-reporter') @add_sub.handle() async def add_sub_handle_id(bot: Bot, event: Event, state: T_State): if 'id' in state: diff --git a/src/plugins/hk_reporter/platform/utils.py b/src/plugins/hk_reporter/platform/utils.py index c940c2e..7ff39ed 100644 --- a/src/plugins/hk_reporter/platform/utils.py +++ b/src/plugins/hk_reporter/platform/utils.py @@ -11,7 +11,7 @@ from ..post import Post from ..send import send_msgs async def check_sub_target(target_type, target): - return platform_manager[target_type].get_account_name(target) + return await platform_manager[target_type].get_account_name(target) platform_manager: dict[str, PlatformProto] = { 'bilibili': Bilibili(),