diff options
author | Cara Salter <cara@devcara.com> | 2022-01-12 22:42:31 -0500 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-01-12 22:42:31 -0500 |
commit | 7bba8dde1387198c84948498ed3296108fdf854c (patch) | |
tree | b0950777695409c4548ab04b0e852409ea68789e /src/commands | |
parent | 5d9e3781b4030d9896e5bde86ab18da3a3d8ee60 (diff) | |
download | glitch-ng-7bba8dde1387198c84948498ed3296108fdf854c.tar.gz glitch-ng-7bba8dde1387198c84948498ed3296108fdf854c.zip |
rroles: Fix release check
numerous syntax errors
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/reactionroles.rs | 7 |
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) } } |