2020-02-02 23:08:15 +02:00
|
|
|
from modules.common.module import BotModule
|
|
|
|
|
|
|
|
|
|
|
|
class MatrixModule(BotModule):
|
2019-12-09 20:24:51 +02:00
|
|
|
async def matrix_message(self, bot, room, event):
|
|
|
|
args = event.body.split()
|
|
|
|
args.pop(0)
|
|
|
|
|
|
|
|
# Echo what they said back
|
2020-02-15 19:51:02 +02:00
|
|
|
self.logger.debug(f"room: {room.name} sender: {event.sender} wants an echo")
|
2019-12-09 20:24:51 +02:00
|
|
|
await bot.send_text(room, ' '.join(args))
|
|
|
|
|
|
|
|
def help(self):
|
2020-02-15 19:51:02 +02:00
|
|
|
return 'Echoes back what user has said'
|