From ce369d4b89e4747e3a4c7542c29a72918b5a71c6 Mon Sep 17 00:00:00 2001 From: Kyomotoi <0w0@imki.moe> Date: Fri, 4 Nov 2022 08:33:18 +0800 Subject: =?UTF-8?q?=E2=9C=A8=20=E6=96=B0=E5=A2=9E=20bot=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=93=8D=E4=BD=9CAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/bot.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ATRI/bot.py diff --git a/ATRI/bot.py b/ATRI/bot.py new file mode 100644 index 0000000..0961a68 --- /dev/null +++ b/ATRI/bot.py @@ -0,0 +1,12 @@ +from typing import Union + +from nonebot.adapters.onebot.v11 import Bot as _Bot +from nonebot.adapters.onebot.v11 import Message + +from ATRI.permission import MASTER_LIST + + +class Bot(_Bot): + async def send_to_master(self, message: Union[str, Message]): + for m in MASTER_LIST: + await self.send_private_msg(user_id=m, message=message) -- cgit v1.2.3