Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed May 20, 2024
1 parent 36ba0f2 commit 0ca5314
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 2 deletions.

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

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

2 changes: 1 addition & 1 deletion src/staff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ pub async fn staff_refresh_top(ctx: Context<'_>) -> Result<(), Error> {
};

// Check if the user is in the main server
if let Some(member) = guild.member(ctx.http(), user_id.into()).await.ok() {
if let Ok(member) = guild.member(ctx.http(), user_id.into()).await {
if let Err(why) = member
.add_role(
ctx.http(),
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/topreviewersync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub async fn topreviewersync(ctx: &serenity::client::Context) -> Result<(), crat
};

// Check if the user is in the main server
if let Some(member) = guild.member(ctx.http(), user_id.into()).await.ok() {
if let Ok(member) = guild.member(ctx.http(), user_id.into()).await {
if let Err(why) = member
.add_role(
ctx.http(),
Expand Down

0 comments on commit 0ca5314

Please sign in to comment.