diff --git a/app/Jobs/DiscordAccountCheck.php b/app/Jobs/DiscordAccountCheck.php index 013da216..30220125 100644 --- a/app/Jobs/DiscordAccountCheck.php +++ b/app/Jobs/DiscordAccountCheck.php @@ -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 @@ -280,7 +281,6 @@ public function handle() $message .= "\n- $role"; } $message .= "\n\n**User Roles Updated!**"; - $discord->sendMessageWithEmbed('1299248165551210506', 'USER: '.$name, $message); $user_updated++; @@ -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);