aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/plugins/r.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-11-03 03:28:35 +0800
committer简律纯 <i@jyunko.cn>2023-11-03 03:28:35 +0800
commit5a2033860a328c4116f0ede2874915315e7487b0 (patch)
treef7b6d88d50ce33bd5fb52fbcfbca906738f412d6 /tests/plugins/r.py
parent4bf6db5200affc2f623aa02301020092c0789d19 (diff)
downloadHydroRoll-5a2033860a328c4116f0ede2874915315e7487b0.tar.gz
HydroRoll-5a2033860a328c4116f0ede2874915315e7487b0.zip
Co-authored-by: HadalFauna <HadalFauna@users.noreply.github.com>
Diffstat (limited to 'tests/plugins/r.py')
-rw-r--r--tests/plugins/r.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/plugins/r.py b/tests/plugins/r.py
new file mode 100644
index 0000000..2f05af9
--- /dev/null
+++ b/tests/plugins/r.py
@@ -0,0 +1,10 @@
+from iamai import Plugin
+
+
+class Roll(Plugin):
+ async def handle(self) -> None:
+ await self.event.reply("""Attack: 25
+Damage: 9""")
+
+ async def rule(self) -> bool:
+ return self.event.type == "message" and self.event.message.startswith("/r")