diff options
| author | Kyomotoi <1172294279@qq.com> | 2020-12-04 13:42:14 +0800 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-04 13:42:14 +0800 | 
| commit | 1e7817304401b6a3b951731e70293bf029c9ff35 (patch) | |
| tree | 0707f5784536ee1357224c7cb130b92d86056594 | |
| parent | 32ed635a79842a8a2ab3ac549210a86b2efc56f1 (diff) | |
| download | ATRI-1e7817304401b6a3b951731e70293bf029c9ff35.tar.gz ATRI-1e7817304401b6a3b951731e70293bf029c9ff35.tar.bz2 ATRI-1e7817304401b6a3b951731e70293bf029c9ff35.zip  | |
[Fix]
| -rw-r--r-- | ATRI/plugins/plugin_admin/__init__.py | 21 | 
1 files changed, 8 insertions, 13 deletions
diff --git a/ATRI/plugins/plugin_admin/__init__.py b/ATRI/plugins/plugin_admin/__init__.py index 2ed9083..1dbbb76 100644 --- a/ATRI/plugins/plugin_admin/__init__.py +++ b/ATRI/plugins/plugin_admin/__init__.py @@ -201,20 +201,15 @@ async def _(bot: Bot, event: Event, state: dict) -> None:      sc_list = []      err_list = [] -    with open(Path('.') / 'utils' / 'utils_rule' / 'ban_list_group.json', -              'r') as f: -        ban_group_list = json.load(f) -      for group in group_list: -        if group['group_id'] not in ban_group_list: -            asyncio.sleep(randint(1, 5)) -            try: -                await bot.send_group_msg(group_id=group['group_id'], -                                         message=msg) -                sc_list.append(group['group_id']) -            except: -                await bot.send(event, f"在尝试推送到群[{group['group_id']}]时失败了呢...") -                err_list.append(group['group_id']) +        asyncio.sleep(randint(1, 5)) +        try: +            await bot.send_group_msg(group_id=group['group_id'], +                                     message=msg) +            sc_list.append(group['group_id']) +        except: +            await bot.send(event, f"在尝试推送到群[{group['group_id']}]时失败了呢...") +            err_list.append(group['group_id'])      msg0 = ""      for i in err_list:  | 
