diff options
author | Kyomotoi <[email protected]> | 2021-03-14 16:22:34 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-03-14 16:22:34 +0800 |
commit | 64a991e035e52e0a17e73d4e671a22ea9a7489da (patch) | |
tree | 8952d23a3d0f165d363e134ff7c64dbf05a670d3 /ATRI/rule.py | |
parent | da888ff020805a38a17e5f83705aeb42ffa992ba (diff) | |
download | ATRI-64a991e035e52e0a17e73d4e671a22ea9a7489da.tar.gz ATRI-64a991e035e52e0a17e73d4e671a22ea9a7489da.tar.bz2 ATRI-64a991e035e52e0a17e73d4e671a22ea9a7489da.zip |
✨🐛 更新插件,修复一些bug
Diffstat (limited to 'ATRI/rule.py')
-rw-r--r-- | ATRI/rule.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/ATRI/rule.py b/ATRI/rule.py index 3b9c403..7cdeb0a 100644 --- a/ATRI/rule.py +++ b/ATRI/rule.py @@ -1,24 +1,7 @@ -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- -''' -File: rule.py -Created Date: 2021-02-03 15:33:57 -Author: Kyomotoi -Email: [email protected] -License: GPLv3 -Project: https://github.com/Kyomotoi/ATRI --------- -Last Modified: Sunday, 7th March 2021 2:58:18 pm -Modified By: Kyomotoi ([email protected]) --------- -Copyright (c) 2021 Kyomotoi -''' - import datetime from random import choice from nonebot.rule import Rule -from nonebot.adapters.cqhttp.event import Event from nonebot.adapters.cqhttp import GroupMessageEvent, PokeNotifyEvent from .config import config @@ -37,7 +20,7 @@ def is_in_service(service: str) -> Rule: return Rule(_is_in_service) -def is_in_banlist() -> Rule: +def is_block() -> Rule: async def _is_in_banlist(bot, event, state) -> bool: return sv.BlockSystem.auth_user(int(event.get_user_id())) |