diff --git a/src/Toadling.php b/src/Toadling.php index 56640c4..db34dfb 100644 --- a/src/Toadling.php +++ b/src/Toadling.php @@ -19,7 +19,7 @@ class Toadling public function __construct() { $this->discord = new Discord([ 'token' => 'OTAyODgxNTUzMjU5MDQ0OTM1.YXk3-Q.VYjX0smJWx4eCRVbxP_ACA3veXI', - 'intents' => Intents::getDefaultIntents() | Intents::GUILD_MEMBERS | Intents::GUILD_PRESENCES, + 'intents' => Intents::getDefaultIntents() | Intents::GUILDS | Intents::GUILD_MEMBERS | Intents::GUILD_PRESENCES, 'loadAllMembers' => true, ]); $this->discord->on('ready', [$this, 'initialize']); @@ -88,7 +88,7 @@ class Toadling } ) ); - array_push($rolesArrayPositions, $colorRole->id); + array_splice($rolesArrayPositions, count($rolesArrayPositions)-1, 0, [$colorCode->id]); $guild->updateRolePositions($rolesArrayPositions); $message->member->addRole($colorRole); $message->delete();