diff options
Diffstat (limited to 'ATRI/plugins/auto_tietie.py')
-rw-r--r-- | ATRI/plugins/auto_tietie.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ATRI/plugins/auto_tietie.py b/ATRI/plugins/auto_tietie.py index 0f78459..a88760e 100644 --- a/ATRI/plugins/auto_tietie.py +++ b/ATRI/plugins/auto_tietie.py @@ -8,8 +8,8 @@ from ATRI.service import Service from ATRI.permission import MASTER -_is_tietie = True -_tietie_wd = choice( +__TIETIE_ENABLED = True +__TIETIE_WORDS = choice( [ "mua!", "贴贴!", @@ -28,40 +28,40 @@ _tietie_wd = choice( ] ) -tt = Service("贴贴").document("全自动贴贴机").only_admin(True).permission(MASTER) +plugin = Service("贴贴").document("全自动贴贴机").permission(MASTER) -auto_tietie = tt.on_message( +auto_tietie = plugin.on_message( "贴贴w", "只与维护者贴贴w, '不可以贴'以拒绝贴贴~, '来贴贴'以接受贴贴~", block=False, priority=11 ) @auto_tietie.handle([Cooldown(600)]) async def _(event: MessageEvent): - if not _is_tietie: + if not __TIETIE_ENABLED: await auto_tietie.finish() user_id = event.get_user_id() at = MessageSegment.at(user_id) - result = at + _tietie_wd # type: ignore + result = at + __TIETIE_WORDS # type: ignore await auto_tietie.finish(result) -no_tietie = tt.on_command("不可以贴", docs="拒绝贴贴") +no_tietie = plugin.on_command("不可以贴", docs="拒绝贴贴") @no_tietie.handle() async def _(): - global _is_tietie - _is_tietie = False + global __TIETIE_ENABLED + __TIETIE_ENABLED = False await no_tietie.finish("好吧...") -yes_tietie = tt.on_command("来贴贴", docs="继续贴贴") +yes_tietie = plugin.on_command("来贴贴", docs="继续贴贴") @yes_tietie.handle() async def _(): - global _is_tietie - _is_tietie = True + global __TIETIE_ENABLED + __TIETIE_ENABLED = True await yes_tietie.finish("好欸!") |