hemppa/modules/echo.py

17 lines
412 B
Python
Raw Normal View History

2019-12-09 20:24:51 +02:00
class MatrixModule:
def matrix_start(self, bot):
2019-12-09 20:38:25 +02:00
print("Echo started.")
2019-12-09 20:24:51 +02:00
def matrix_stop(self, bot):
2019-12-09 20:38:25 +02:00
print("Echo stopped")
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
await bot.send_text(room, ' '.join(args))
def help(self):
return('Echoes back what user has said')