Update hello world example and add config example
This commit is contained in:
parent
400c9aaebc
commit
ac69c50b80
8 changed files with 49 additions and 10 deletions
10
examples/helloworld/helloworld.py
Normal file
10
examples/helloworld/helloworld.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from mautrix.types import EventType
|
||||
from maubot import Plugin, MessageEvent
|
||||
from maubot.handlers import event
|
||||
|
||||
|
||||
class HelloWorldBot(Plugin):
|
||||
@event.on(EventType.ROOM_MESSAGE)
|
||||
async def handler(self, event: MessageEvent) -> None:
|
||||
if event.sender != self.client.mxid:
|
||||
await event.reply("Hello, World!")
|
Loading…
Add table
Add a link
Reference in a new issue