From f0c0186170e83af2ebd1b788e2ab1d274a8fb881 Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sun, 10 Nov 2024 13:38:38 -0700 Subject: Use correct function --- src/system/bot/client.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/system/bot/client.rs') 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(()) } -- cgit 1.4.1