summaryrefslogtreecommitdiff
path: root/ATRI/plugins/send.py
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/plugins/send.py')
-rw-r--r--ATRI/plugins/send.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/ATRI/plugins/send.py b/ATRI/plugins/send.py
index 69fc1b0..a04dc83 100644
--- a/ATRI/plugins/send.py
+++ b/ATRI/plugins/send.py
@@ -1,13 +1,12 @@
import time
+import json
+from pathlib import Path
import nonebot
from nonebot import on_command, CommandSession
-import config # type: ignore
-
bot = nonebot.get_bot()
master = bot.config.SUPERUSERS
-ban_group = bot.config.BANGROUP # type: ignore
@on_command('send_all_group', aliases = ['公告', '群发', '推送'], only_to_me=False)
@@ -17,6 +16,14 @@ async def send_all_group(session: CommandSession):
start = time.perf_counter()
+ try:
+ with open(Path('.') / 'ATRI' / 'plugins' / 'noobList' / 'noobGroup.json', 'r') as f:
+ data = json.load(f)
+ except:
+ data = {}
+
+ ban_group = list(data.keys())
+
if not msg:
msg = session.get('message', prompt='请告诉吾辈需要群发的内容~!')