aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/plugins/_bradge-kook-cqhttp.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-11-06 23:29:40 +0800
committer简律纯 <i@jyunko.cn>2023-11-06 23:29:40 +0800
commitf3bea281fbe19f5c8b4fae94b8832eee3ccfcf70 (patch)
tree90132b80b643cdf5e3295e93dda542c27bb5283a /tests/plugins/_bradge-kook-cqhttp.py
parent70c118d37cd784861bec712000d7014302591256 (diff)
downloadHydroRoll-f3bea281fbe19f5c8b4fae94b8832eee3ccfcf70.tar.gz
HydroRoll-f3bea281fbe19f5c8b4fae94b8832eee3ccfcf70.zip
refactor(file tree): `tests` -> `example`
Diffstat (limited to 'tests/plugins/_bradge-kook-cqhttp.py')
-rw-r--r--tests/plugins/_bradge-kook-cqhttp.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/plugins/_bradge-kook-cqhttp.py b/tests/plugins/_bradge-kook-cqhttp.py
deleted file mode 100644
index 4b2712d..0000000
--- a/tests/plugins/_bradge-kook-cqhttp.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from iamai import Plugin
-
-
-class Bradge(Plugin):
- async def handle(self) -> None:
- if self.event.adapter.name == "kook":
- await self.bot.get_adapter("cqhttp").call_api(
- "send_group_msg",
- group_id=971050440,
- message=f"[{self.event.adapter.name} - {self.event.extra.author.username}]\n{self.event.message}"
- )
- elif self.event.adapter.name == "cqhttp":
- if self.event.group_id == 971050440:
- await self.bot.get_adapter("kook").call_api(
- api="message/create",
- target_id=1661426334688259,
- content=f"[{self.event.adapter.name} - {self.event.sender.nickname}]\n{self.event.message}"
- )
-
- async def rule(self) -> bool:
- if self.event.adapter.name not in ["cqhttp","kook"]:
- return False
- if self.event.type not in ["message","9",9]:
- return False
- return True \ No newline at end of file