summary refs log tree commit diff
path: root/src/system/bot/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/system/bot/client.rs')
-rw-r--r--src/system/bot/client.rs9
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(())
     }