From 7bba8dde1387198c84948498ed3296108fdf854c Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Wed, 12 Jan 2022 22:42:31 -0500 Subject: rroles: Fix release check numerous syntax errors --- src/commands/reactionroles.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/commands/reactionroles.rs') diff --git a/src/commands/reactionroles.rs b/src/commands/reactionroles.rs index eb5f098..df98ef3 100644 --- a/src/commands/reactionroles.rs +++ b/src/commands/reactionroles.rs @@ -16,14 +16,15 @@ async fn allowed_to_create_roles(ctx: Context<'_>) -> Result { #[cfg(not(debug_assertions))] async fn allowed_to_create_roles(ctx: Context<'_>) -> Result { if let Some(guild) = ctx.guild() { - if guild.owner.id == ctx.author().id { + if guild.owner_id == ctx.author().id { Ok(true) } else { - let member = guild.member(ctx.discord(), ctx.author().id)?; - let member_permissions = member.permissions().await?; + let member = guild.member(ctx.discord(), ctx.author().id).await?; + let member_permissions = member.permissions(ctx.discord())?; Ok(member_permissions.manage_roles()) } +} else { Ok(false) } } -- cgit v1.2.3