from maubot import Plugin, MessageEvent from maubot.handlers import command class Bot(Plugin): """Hello world bot for USERNAME""" @command.new("hello") async def hello_command(self, evt: MessageEvent) -> None: """Respond to !hello command""" await evt.reply(f"Hello from USERNAME's bot!") @command.new("ping") async def ping_command(self, evt: MessageEvent) -> None: """Respond to !ping command""" await evt.reply("Pong!") @command.new("whoami") async def whoami_command(self, evt: MessageEvent) -> None: """Tell the user who they are""" await evt.reply(f"You are {evt.sender}")