Skip to content

Commit

Permalink
Update DiscordAccountCheck.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMicallefYBSU committed Oct 22, 2024
1 parent bba4e11 commit 3fade03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Jobs/DiscordAccountCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function handle()
$in_discord++;

sleep(1);

// Get Discord Member Information
$discord_member = $discord->getClient()->get('guilds/'.env('DISCORD_GUILD_ID').'/members/'.$discord_uid);
$discord_member = json_decode($discord_member->getBody(), true);
Expand Down Expand Up @@ -223,6 +223,8 @@ public function handle()
$rolesToAdd[] = $roleId; // Add the role ID to rolesToAdd if present in user's roles
}
}

$rolesToAdd = array_diff($rolesToAdd, $discord_member['roles']);
}

// Name Format for ZQO Members and Other Members
Expand Down

0 comments on commit 3fade03

Please sign in to comment.