Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Discord Php Laravel Package

team-reflex/discord-php

DiscordPHP is a PHP wrapper for Discord’s REST, gateway, and voice APIs. Build Discord bots that run in CLI with ReactPHP-style async handling. Includes limited docs/class reference and community integrations like Laracord for Laravel.

View on GitHub
Deep Wiki
Context7

title: "FAQ"

Class 'X' not found

You most likely haven't imported the class that you are trying to use. Please check the class reference and search for the class that you are trying to use. Add an import statement at the top of the file like shown on the right.

<?php

use Discord\X;

If you don't want to have to import a class every time, you should look into the PHP Intelephense language server (written above) which will do automatic imports for you.

There are less members and/or users than expected

Server members are guarded by a priviliged server intent which must be enabled in the Discord Developer Portal. Note that you will need to verify your bot if you use this intent and pass 100 guilds.

You also need to enable the loadAllMembers option in your code, as shown on the right.

$discord = new Discord([
    'token' => '...',
    'loadAllMembers' => true, // Enable this option
]);

If you are using DiscordPHP Version 6 or greater, you need to enable the GUILD_MEMBERS intent as well as the loadAllMembers option. The shown code will enable all intents minus the GUILD_PRESENCES intent (which is also priviliged).


$discord = new Discord([
    'token' => '...',
    'loadAllMembers' => true,
    'intents' => Intents::getDefaultIntents() | Intents::GUILD_MEMBERS // Enable the `GUILD_MEMBERS` intent
])
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope