diff options
author | Ashelyn Rose <git@ashen.earth> | 2024-11-10 12:52:02 -0700 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2024-11-10 12:52:02 -0700 |
commit | 66208d1d9fcd32a88dcd9ecba13e87723812028a (patch) | |
tree | a3a080fa136c50e7d160f79c1b83a58e5d3e418d /src/system/mod.rs | |
parent | 058fb241e4373e083f1ab706904bd601abbf509a (diff) |
Implement nick command
Diffstat (limited to 'src/system/mod.rs')
-rw-r--r-- | src/system/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/system/mod.rs b/src/system/mod.rs index e2bd1ee..30850d3 100644 --- a/src/system/mod.rs +++ b/src/system/mod.rs @@ -341,6 +341,13 @@ impl Manager { ))); } + message_parser::ParsedMessage::Command(Command::Nick(member_id, nick)) => { + let member = self.bots.get(&member_id).unwrap(); + let server_id = message.guild_id.expect("Message has no guild"); + + member.set_nick(server_id, nick).await; + } + message_parser::ParsedMessage::Command(Command::UnknownCommand) => { let member_id = if let Some((member_id, _)) = self.latch_state { member_id |