Skip to content

Commit

Permalink
Merge pull request #381 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Joshua branch
  • Loading branch information
JoshuaMicallefYBSU authored Oct 22, 2024
2 parents c61a940 + b741573 commit 430b272
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app/Jobs/DiscordAccountCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public function handle()
$user->discord_username = $discord_member['user']['username'];
$user->discord_avatar = $user->avatar ? 'https://cdn.discordapp.com/avatars/'.$user->discord_user_id.'/'.$discord_member['user']['avatar'].'.png' : null;
$user->save();

// Skip Gary (Discord Owner)
if($user->discord_user_id == 350995372627197954){
continue;
}

// Roles Calculation
{
Expand Down Expand Up @@ -234,14 +239,13 @@ public function handle()
$name = $user->FullName('FLC');
}


// Update user
$discord->getClient()->patch('guilds/'.env('DISCORD_GUILD_ID').'/members/'.$user->discord_user_id, [
'json' => [
'nick' => $name,
'roles' => $discord_roles,
]
]);
// Update user
$discord->getClient()->patch('guilds/'.env('DISCORD_GUILD_ID').'/members/'.$user->discord_user_id, [
'json' => [
'nick' => $name,
'roles' => $discord_roles,
]
]);


} else {
Expand All @@ -259,7 +263,7 @@ public function handle()
foreach($discord_uids as $discord_uid){
$accounts_not_linked++; //records that Account Not Linked Role Assigned

sleep(2);
sleep(1);

// add role
$discord->getClient()->put('guilds/'.env('DISCORD_GUILD_ID').'/members/'.$discord_uid.'/roles/1297422968472997908');
Expand Down

0 comments on commit 430b272

Please sign in to comment.