From f4119aad9936f6b643531073a0b6a469cb0cdbb7 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 9 Jun 2022 11:26:03 +0000 Subject: =?UTF-8?q?:rotating=5Flight:=20=E8=87=AA=E5=8A=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/applet/data_source.py | 4 ++-- ATRI/plugins/console/data_source.py | 2 +- ATRI/plugins/setu/__init__.py | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ATRI/plugins/applet/data_source.py b/ATRI/plugins/applet/data_source.py index 60ca581..e94c0d9 100644 --- a/ATRI/plugins/applet/data_source.py +++ b/ATRI/plugins/applet/data_source.py @@ -26,7 +26,7 @@ class Applet(Service): def _bv_dec(x) -> str: r = 0 for i in range(6): - r += tr[x[s[i]]] * 58 ** i + r += tr[x[s[i]]] * 58**i return str((r - add) ^ xor) @staticmethod @@ -34,7 +34,7 @@ class Applet(Service): x = (x ^ xor) + add r = list("BV1 4 1 7 ") for i in range(6): - r[s[i]] = table[x // 58 ** i % 58] + r[s[i]] = table[x // 58**i % 58] return "".join(r) @staticmethod diff --git a/ATRI/plugins/console/data_source.py b/ATRI/plugins/console/data_source.py index 86a3813..f6bbf16 100644 --- a/ATRI/plugins/console/data_source.py +++ b/ATRI/plugins/console/data_source.py @@ -30,7 +30,7 @@ class Console(Service): s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - s.connect(('8.8.8.8', 80)) + s.connect(("8.8.8.8", 80)) ip = s.getsockname()[0] return ip finally: diff --git a/ATRI/plugins/setu/__init__.py b/ATRI/plugins/setu/__init__.py index 6656f29..2f6efb0 100644 --- a/ATRI/plugins/setu/__init__.py +++ b/ATRI/plugins/setu/__init__.py @@ -16,7 +16,9 @@ random_setu = Setu().on_command("来张涩图", "来张随机涩图,冷却2分 @random_setu.handle([Cooldown(120)]) -async def _(): ... +async def _(): + ... + @random_setu.handle() async def _random_setu(bot: Bot, event: MessageEvent): -- cgit v1.2.3