Removed the leading "!" in the bot response

When adding a command, if the user prefixed it with an exclamation mark, it was displayed in double in the bot response.
main
Nicolas Ong 2024-03-26 14:57:42 +01:00
parent 4019282094
commit 084dae767c
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ class CommandService(Service):
def add_command(self, command, args): def add_command(self, command, args):
self.commands[command.lstrip("!")] = args.split("||") self.commands[command.lstrip("!")] = args.split("||")
self.write() self.write()
return f"La commande '!{command}' a été ajoutée" str_command = command.lstrip("!")
return f"La commande '!{str_command}' a été ajoutée"
def del_command(self, command): def del_command(self, command):
if command not in self.commands: if command not in self.commands: