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 19, 2024
1 parent a90324f commit 0b9a121
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 15 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.

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

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

let channel = interaction.channel.as_ref();
if channel.is_some_and(|c| is_thread(c.kind)) {
Expand Down

0 comments on commit 0b9a121

Please sign in to comment.