from edmond.plugin import Plugin class UnknownCommandPlugin(Plugin): def __init__(self, bot): super().__init__(bot) self.priority = -6 def on_pubmsg(self, event): message = self.should_read_message(event.arguments[0]) if not message: return False words = message.split() if len(words) == 0 or words[-1] != self.config["command_suffix"]: return False query = " ".join(words[:-1]) self.bot.say(event.target, f"UnknownCommand: {query}") return True