commit 09228410019e625ca1f2e62a83a291d058bda638
parent 8c15592cbf90e18b9b97d52266d86064a0c813a0
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 17 Aug 2021 01:27:29 +0200
Cleanup code logic
Diffstat:
1 file changed, 0 insertions(+), 4 deletions(-)
diff --git a/maubot_audio_preventer/bot.py b/maubot_audio_preventer/bot.py
@@ -64,10 +64,6 @@ If you then still not comply you will after {self.config['kick_warning_amount']}
@event.on(m_voice_event)
async def handle_m_voice_event(self, evt: GenericEvent) -> None:
- content = TextMessageEventContent(
- msgtype=MessageType.NOTICE, content="Please do not send Audio or Voice messages. This is your first warning!")
- content.set_reply(evt.event_id)
- await self.client.send_message_event(evt.room_id, EventType.ROOM_MESSAGE, content)
await self.client.redact(evt.room_id, evt.event_id, "Voice messages are not allowed")
warnings = self.db.get_user(evt.sender)