Skip to content

Commit

Permalink
Merge pull request #401 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Update DiscordAccountCheck.php
  • Loading branch information
JoshuaMicallefYBSU authored Oct 25, 2024
2 parents 495da85 + 5cc5766 commit e2edcf0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/Jobs/DiscordAccountCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ public function handle()
}

if($discord_member_details === false){
// 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);
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);
}

// Discord Account is Linked. Remove from Check
Expand Down Expand Up @@ -280,7 +281,6 @@ public function handle()
$message .= "\n- $role";
}
$message .= "\n\n**User Roles Updated!**";
$discord->sendMessageWithEmbed('1299248165551210506', 'USER: '.$name, $message);

$user_updated++;

Expand All @@ -300,7 +300,11 @@ public function handle()
// add role
$discord->getClient()->put('guilds/'.env('DISCORD_GUILD_ID').'/members/'.$discord_uid.'/roles/'.$role);
}
} else {
$message = "User Not Updated";
}

$discord->sendMessageWithEmbed('1299248165551210506', 'USER: '.$name, $message);



Expand Down

0 comments on commit e2edcf0

Please sign in to comment.