From 7b0bf0a5722ba8cab6e6d3ccb741551db8866bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skirt=E2=9C=BF?= <91937041+X-Skirt-X@users.noreply.github.com> Date: Tue, 4 Oct 2022 14:19:10 +0800 Subject: [PATCH] # bugfix --- nonebot_plugin_dialectlist/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nonebot_plugin_dialectlist/__init__.py b/nonebot_plugin_dialectlist/__init__.py index 4a937e1..becd63b 100644 --- a/nonebot_plugin_dialectlist/__init__.py +++ b/nonebot_plugin_dialectlist/__init__.py @@ -168,8 +168,8 @@ async def handle_message( if isinstance(event,GroupMessageEvent): if plugin_config.dialectlist_excluded_self: - bot_id:str = await bot.call_api('get_login_info') - plugin_config.dialectlist_excluded_people.append(bot_id) + bot_id = await bot.call_api('get_login_info') + plugin_config.dialectlist_excluded_people.append(str(bot_id["user_id"])) gids:List[str] = [str(event.group_id)] msg_list = await get_message_records( group_ids=gids, @@ -182,7 +182,7 @@ async def handle_message( elif isinstance(event, GuildMessageEvent): if plugin_config.dialectlist_excluded_self: bot_id = await bot.call_api('get_guild_service_profile') - plugin_config.dialectlist_excluded_people.append(bot_id) + plugin_config.dialectlist_excluded_people.append(str(bot_id["user_id"])) guild_ids:List[str] = await get_guild_all_channel(event.guild_id,bot=bot) msg_list = await get_message_records( group_ids=guild_ids, @@ -202,4 +202,4 @@ async def handle_message( await rankings.send(msg) await asyncio.sleep(1) #让图片先发出来 await rankings.finish(plugin_config.dialectlist_string_suffix_format.format(timeCost=time.time()-st-1)) - \ No newline at end of file +