aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/example/plugins/r.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 /example/plugins/r.py
parent70c118d37cd784861bec712000d7014302591256 (diff)
downloadHydroRoll-f3bea281fbe19f5c8b4fae94b8832eee3ccfcf70.tar.gz
HydroRoll-f3bea281fbe19f5c8b4fae94b8832eee3ccfcf70.zip
refactor(file tree): `tests` -> `example`
Diffstat (limited to 'example/plugins/r.py')
-rw-r--r--example/plugins/r.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/example/plugins/r.py b/example/plugins/r.py
new file mode 100644
index 0000000..2f05af9
--- /dev/null
+++ b/example/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")