aboutsummaryrefslogtreecommitdiff
path: root/src/commands/reactionroles.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/reactionroles.rs')
-rw-r--r--src/commands/reactionroles.rs7
1 files changed, 4 insertions, 3 deletions
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<bool, Error> {
#[cfg(not(debug_assertions))]
async fn allowed_to_create_roles(ctx: Context<'_>) -> Result<bool, Error> {
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)
}
}