From 084dae767c71e5cbad7ab5fef7f06ff84023a28b Mon Sep 17 00:00:00 2001 From: Nicolas Ong Date: Tue, 26 Mar 2024 14:57:42 +0100 Subject: [PATCH] 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. --- services/CommandService.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/CommandService.py b/services/CommandService.py index 1f33303..4896ae8 100644 --- a/services/CommandService.py +++ b/services/CommandService.py @@ -86,7 +86,8 @@ class CommandService(Service): def add_command(self, command, args): self.commands[command.lstrip("!")] = args.split("||") 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): if command not in self.commands: