From 5e6a11a19d0fec86c9c08d5ce9c5fcc176efde4b Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sun, 10 Nov 2024 13:40:37 -0700 Subject: Delete message after command --- src/system/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/system/mod.rs b/src/system/mod.rs index 30850d3..8864139 100644 --- a/src/system/mod.rs +++ b/src/system/mod.rs @@ -342,10 +342,11 @@ impl Manager { } message_parser::ParsedMessage::Command(Command::Nick(member_id, nick)) => { - let member = self.bots.get(&member_id).unwrap(); + let bot = self.bots.get(&member_id).unwrap(); let server_id = message.guild_id.expect("Message has no guild"); - member.set_nick(server_id, nick).await; + bot.set_nick(server_id, nick).await; + let _ = bot.delete_message(message.channel_id, message.id).await; } message_parser::ParsedMessage::Command(Command::UnknownCommand) => { -- cgit 1.4.1