Skip to content

Commit

Permalink
Fix breakage due to Interaction::app_permissions unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Nov 13, 2024
1 parent cb6bd15 commit 2a824af
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 17 deletions.
64 changes: 51 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/dispatch/permissions/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ pub(super) fn get_author_and_bot_permissions(
let err = "should always be some as inside interaction";
let author_permissions = author_member.permissions.expect(err);

let err = "should always be some according to discord docs";
let bot_permissions = interaction.app_permissions.expect(err);

PermissionsInfo {
author_permissions: Some(author_permissions),
bot_permissions: Some(bot_permissions),
bot_permissions: Some(interaction.app_permissions),
}
}

0 comments on commit 2a824af

Please sign in to comment.