Skip to content

Commit

Permalink
Swap /set nick to need manage_nicknames instead of admin
Browse files Browse the repository at this point in the history
Closes #108
  • Loading branch information
GnomedDev committed Nov 7, 2024
1 parent b80f83d commit 15859e4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tts_commands/src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,14 +1003,8 @@ pub async fn nick(
let guild_id = ctx.guild_id().unwrap();
let user = user.as_ref().unwrap_or(author);

if author.id != user.id
&& !guild_id
.member(ctx, author.id)
.await?
.permissions(ctx.cache())?
.administrator()
{
ctx.say("**Error**: You need admin to set other people's nicknames!")
if author.id != user.id && !ctx.author_permissions()?.manage_nicknames() {
ctx.say("**Error**: You need permission to set other people's nicknames!")
.await?;
return Ok(());
}
Expand Down

0 comments on commit 15859e4

Please sign in to comment.