diff options
author | Ashelyn Rose <git@ashen.earth> | 2024-11-10 13:38:38 -0700 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2024-11-10 13:38:38 -0700 |
commit | f0c0186170e83af2ebd1b788e2ab1d274a8fb881 (patch) | |
tree | bc627380316578785b36fc1f73244864123c0b19 /src/system | |
parent | 66208d1d9fcd32a88dcd9ecba13e87723812028a (diff) |
Use correct function
Diffstat (limited to 'src/system')
-rw-r--r-- | src/system/bot/client.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/system/bot/client.rs b/src/system/bot/client.rs index 19fcbe6..c556207 100644 --- a/src/system/bot/client.rs +++ b/src/system/bot/client.rs @@ -26,13 +26,10 @@ impl Client { pub async fn set_nick<'a>(&self, server_id: ServerId, nick: &'a str) -> Result<(), TwiError> { let client = self.client.lock().await; - let current_user = client.current_user() - .await?.model().await.expect("Could not retrieve current user"); - client - .update_guild_member(server_id, current_user.id) - .nick(Some(nick)).expect("Invalid nick") - .await?; + .update_current_member(server_id) + .nick(Some(nick)).expect("Invalid nick") + .await?; Ok(()) } |