From b5ec2a17a56c801891ea71b241f3ad6b25bda707 Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Mon, 1 Apr 2024 18:08:29 +0000 Subject: [PATCH] Actual hell Signed-off-by: Izuru Yakumo git-svn-id: https://svn.yakumo.dev/yakumo.izuru/chen/trunk@38 32723744-9b23-0b4a-b1da-9b2e968f9461 --- main.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/main.py b/main.py index e98abc8..c0b03e6 100644 --- a/main.py +++ b/main.py @@ -266,8 +266,8 @@ class ChenBot(ClientXMPP): print(e) cm = ctx.pop(0) - if cm in self.muc_commands: - self.muc_commands[cm](msg, ctx, sender) + if cm in self.commands: + self.commands[cm](msg, ctx, sender) async def muc_message(self, msg): """Process a groupchat message.""" @@ -290,7 +290,7 @@ class ChenBot(ClientXMPP): if cm in self.muc_commands: self.muc_commands[cm](msg, ctx, sender) - @self.muc_word + @self.muc_command def repo(msg, ctx, sender): if ctx: return @@ -300,16 +300,6 @@ class ChenBot(ClientXMPP): mtype="groupchat", ) - @self.word - def repo(msg, ctx, sender): - if ctx: - return - bot.send_message( - mto=sender, - mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen", - mtype="chat", - ) - if __name__ == "__main__": config = configparser.ConfigParser() config.read("config.ini")