2018-12-09 13:17:21 +00:00
|
|
|
from mautrix.types import EventType
|
2019-01-07 06:14:29 +00:00
|
|
|
from maubot import Plugin, MessageEvent
|
|
|
|
from maubot.handlers import event
|
2018-12-09 13:17:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HelloWorldBot(Plugin):
|
2019-01-07 06:14:29 +00:00
|
|
|
@event.on(EventType.ROOM_MESSAGE)
|
2018-12-09 13:17:21 +00:00
|
|
|
async def handler(self, event: MessageEvent) -> None:
|
|
|
|
if event.sender != self.client.mxid:
|
|
|
|
await event.reply("Hello, World!")
|