We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's the error:
Fatal error: Uncaught Error: Call to a member function get() on null in init.php:33 Stack trace: #0 [internal function]: {closure}(Object(Discord\Parts\Channel\Message), Object(Discord\Discord), Object(Discord\Discord)) #1 /{DISCORD_DIR}/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(64): call_user_func_array(Object(Closure), Array) #2 /{DISCORD_DIR}/src/Discord/WebSockets/WebSocket.php(633): Evenement\EventEmitter->emit('MESSAGE_CREATE', Array) #3 /{DISCORD_DIR}/src/Discord/WebSockets/WebSocket.php(249): Discord\WebSockets\WebSocket->handleHandler(Array, Object(stdClass)) #4 [internal function]: Discord\WebSockets\WebSocket->Discord\WebSockets\{closure}(Object(Ratchet\RFC6455\Messaging\Message), Object(Ratchet\Client\WebSocket)) #5 /{DISCORD_DIR}/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(64): call_user_func_array(Object(Closure), Array)
Line 33 of my code is:
$guild = $discord->guilds->get('id', $message->full_channel->guild->id); $member = $guild->members->get('id', $message->author->id); $array['userdata'] = $member->user; if($member->roles->get('name', 'BOT CONTROLING')) { /* This is line 33 */ $array['can_control_bot'] = TRUE; } else { $array['can_control_bot'] = FALSE; } $message->channel->sendMessage("```".json_encode($array)."```");
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here's the error:
Line 33 of my code is:
The text was updated successfully, but these errors were encountered: