aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-01-12 22:42:31 -0500
committerCara Salter <cara@devcara.com>2022-01-12 22:42:31 -0500
commit7bba8dde1387198c84948498ed3296108fdf854c (patch)
treeb0950777695409c4548ab04b0e852409ea68789e /src
parent5d9e3781b4030d9896e5bde86ab18da3a3d8ee60 (diff)
downloadglitch-ng-7bba8dde1387198c84948498ed3296108fdf854c.tar.gz
glitch-ng-7bba8dde1387198c84948498ed3296108fdf854c.zip
rroles: Fix release check
numerous syntax errors
Diffstat (limited to 'src')
-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)
}
}