summary refs log tree commit diff
path: root/src/system
diff options
context:
space:
mode:
authorAshelyn Rose <git@ashen.earth>2024-11-10 13:40:37 -0700
committerAshelyn Rose <git@ashen.earth>2024-11-10 13:40:37 -0700
commit5e6a11a19d0fec86c9c08d5ce9c5fcc176efde4b (patch)
tree11c0efeec7b6e951017b9695a03e059c016a33ac /src/system
parentf0c0186170e83af2ebd1b788e2ab1d274a8fb881 (diff)
Delete message after command HEAD main
Diffstat (limited to 'src/system')
-rw-r--r--src/system/mod.rs5
1 files 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) => {