aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/example/plugins/r.py
blob: 2f05af952bead789acc94f62bbce4c45b293bc03 (plain) (blame)
1
2
3
4
5
6
7
8
9
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")