diff options
author | Kyomotoi <[email protected]> | 2020-09-13 16:36:05 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-09-13 16:36:05 +0800 |
commit | 9c91cc1c7f39a7178e753d5f32a707db0ae19790 (patch) | |
tree | 3c6c24745985fc8703a3dab1d188c0bade31c2af /ATRI/plugins/onMessage.py | |
parent | 681b8c7c8841c8c889f77bf54d1cf1ce9914c016 (diff) | |
download | ATRI-9c91cc1c7f39a7178e753d5f32a707db0ae19790.tar.gz ATRI-9c91cc1c7f39a7178e753d5f32a707db0ae19790.tar.bz2 ATRI-9c91cc1c7f39a7178e753d5f32a707db0ae19790.zip |
[Update]
Diffstat (limited to 'ATRI/plugins/onMessage.py')
-rw-r--r-- | ATRI/plugins/onMessage.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ATRI/plugins/onMessage.py b/ATRI/plugins/onMessage.py index fc888e4..0ab8f88 100644 --- a/ATRI/plugins/onMessage.py +++ b/ATRI/plugins/onMessage.py @@ -6,8 +6,9 @@ from pathlib import Path from random import randint, choice from ATRI.modules.error import errorBack +from ATRI.modules.time import sleepTime from ATRI.modules.funcControl import checkSwitch, checkNoob -from ATRI.plugins.SauceNAO import API_KEY, now_time, SauceNAO +from ATRI.plugins.SauceNAO import API_KEY, SauceNAO bot = nonebot.get_bot() @@ -17,7 +18,7 @@ bot = nonebot.get_bot() async def _(context): group = context["group_id"] user = context["user_id"] - if 0 <= now_time() < 5.5: + if sleepTime(): pass else: if checkNoob(user, group): @@ -108,7 +109,7 @@ async def _(context): user = context["user_id"] group = context["group_id"] if checkNoob(user, group): - if 0 <= now_time() < 5.5: + if sleepTime(): pass else: if randint(1,20) == 4: |