Remove commands from muc_message handler

このコミットが含まれているのは:
Kylie Czar 2021-05-16 19:32:03 -03:00
コミット 75422e885a
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 2DBA9558E9277C37
1個のファイルの変更6行の追加8行の削除

14
main.py
ファイルの表示

@ -277,20 +277,18 @@ class AngelBot(ClientXMPP):
if msg["mucnick"] == self.nick:
return
ctx = msg["body"].strip().split()
edit = "urn:xmpp:message-correct:0" in str(msg)
if edit:
return
try:
if not msg["oob"]["url"]:
if urls := self.get_urls(msg):
await self.parse_urls(msg, urls, sender, mtype)
except Exception:
pass
edit = "urn:xmpp:message-correct:0" in str(msg)
cm = ctx.pop(0)
if cm in self.muc_commands:
if not edit:
self.muc_commands[cm](msg, ctx, sender)
else:
self.s(msg, sender, mtype)
self.s(msg, sender, mtype)
if __name__ == "__main__":