diff options
author | Kyomotoi <[email protected]> | 2020-09-13 16:38:54 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-09-13 16:38:54 +0800 |
commit | fa8aa0688b56512b4052c697faab1a8b853b788a (patch) | |
tree | 773923447f9058051be11468bdccf4179fb2060d /ATRI/plugins | |
parent | 9c91cc1c7f39a7178e753d5f32a707db0ae19790 (diff) | |
download | ATRI-fa8aa0688b56512b4052c697faab1a8b853b788a.tar.gz ATRI-fa8aa0688b56512b4052c697faab1a8b853b788a.tar.bz2 ATRI-fa8aa0688b56512b4052c697faab1a8b853b788a.zip |
[Fix]
Diffstat (limited to 'ATRI/plugins')
-rw-r--r-- | ATRI/plugins/Setu.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ATRI/plugins/Setu.py b/ATRI/plugins/Setu.py index 385a05f..42d8bdc 100644 --- a/ATRI/plugins/Setu.py +++ b/ATRI/plugins/Setu.py @@ -9,9 +9,9 @@ from random import choice, randint from pathlib import Path from datetime import datetime from random import choice -from aiohttp import client import nonebot from nonebot import on_command, CommandSession +from nonebot.helpers import send_to_superusers import config from ATRI.modules.error import errorBack @@ -99,8 +99,8 @@ async def setu(session: CommandSession): img = i[7] end = time.perf_counter() await session.send('我找到涩图了!但我发给主人了\nο(=•ω<=)ρ⌒☆') - await bot.send_private_msg( # type: ignore - user_id = master, + await send_to_superusers( + bot, message = f"主人,从群{group}来的涩图!热乎着!\nTitle: {title}\nPid: {pid}\n{img}\nComplete time: {round(end - start, 3)}" ) @@ -135,8 +135,8 @@ async def setu(session: CommandSession): elif res == 5: end = time.perf_counter() await session.send('我找到涩图了!但我发给主人了\nο(=•ω<=)ρ⌒☆') - await bot.send_private_msg( # type: ignore - user_id = master, + await send_to_superusers( + bot, message = f"主人,从群{group}来的涩图!热乎着!\nTitle: {title}\nPid: {pid}\n{setu}\nComplete time: {round(end - start, 3)}" ) elif res == 4: @@ -261,8 +261,8 @@ async def _(context): img = i[7] end = time.perf_counter() await bot.send_group_msg(group_id = group, message = '我找到涩图了!但我发给主人了\nο(=•ω<=)ρ⌒☆') # type: ignore - await bot.send_private_msg( # type: ignore - user_id = master, + await send_to_superusers( + bot, message = f"主人,从群{group}来的涩图!热乎着!\nTitle: {title}\nPid: {pid}\n{img}\nComplete time: {round(end - start, 3)}" ) @@ -296,8 +296,8 @@ async def _(context): elif res == 5: end = time.perf_counter() await bot.send_group_msg(group_id = group, message = '我找到涩图了!但我发给主人了\nο(=•ω<=)ρ⌒☆') # type: ignore - await bot.send_private_msg( # type: ignore - user_id = master, + await send_to_superusers( + bot, message = f"主人,从群{group}来的涩图!热乎着!\nTitle: {title}\nPid: {pid}\n{setu}\nComplete time: {round(end - start, 3)}" ) elif res == 5: |