summaryrefslogtreecommitdiff
path: root/ATRI/plugins/repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/plugins/repo.py')
-rw-r--r--ATRI/plugins/repo.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/ATRI/plugins/repo.py b/ATRI/plugins/repo.py
index dd67476..38bbe04 100644
--- a/ATRI/plugins/repo.py
+++ b/ATRI/plugins/repo.py
@@ -2,10 +2,10 @@ from random import choice
from nonebot.matcher import Matcher
from nonebot.params import CommandArg, ArgPlainText
-from nonebot.adapters.onebot.v11 import Bot, MessageEvent, Message
+from nonebot.adapters.onebot.v11 import MessageEvent, Message
from nonebot.adapters.onebot.v11.helpers import Cooldown
-from ATRI import conf
+from ATRI.bot import Bot
from ATRI.service import Service
from ATRI.message import MessageBuilder
@@ -45,10 +45,9 @@ async def _deal_repo(
user_id = event.get_user_id()
repo_0 = _REPO_FORMAT.format(user=user_id, msg=repo_msg)
- for superuser in conf.BotConfig.superusers:
- try:
- await bot.send_private_msg(user_id=superuser, message=repo_0)
- except Exception:
- await reporter.finish("发送失败了呢...")
+ try:
+ await bot.send_to_master(repo_0)
+ except Exception:
+ await reporter.finish("发送失败了呢...")
await reporter.finish("吾辈的心愿已由咱转告维护者!")