From 6043643a94251a6f6e243104a11af5f57babcbdc Mon Sep 17 00:00:00 2001 From: Dany Thach Date: Sun, 31 Oct 2021 19:45:15 +0100 Subject: [PATCH] Please work I beg you --- src/Toadling.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();