Change bot to send m.notice instead of m.text
@ -192,7 +192,7 @@ class Client:
async def send_text(self, room: Room, body: str, formatted_body: str = None, format_type: str = None):
content = {
'msgtype': 'm.text',
'msgtype': 'm.notice',
'body': body
}
if formatted_body and format_type:
@ -68,6 +68,9 @@ class Bot(Client):
return Context.get_context(event, prefix, called_with, body)
async def process_command(self, event):
if not event.content.msgtype == 'm.text':
return
ctx = await self.get_context(event)
if not ctx:
@ -78,7 +78,6 @@ class Command:
args.extend(params.__dict__[key])
else:
kwargs[key] = params.__dict__[key]
await self.function(ctx, *args, **kwargs)
await self.function(ctx)