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: "Channels"

Requires the Intents::GUILDS intent.

Channel Create

Called with a Channel object when a new channel is created, relevant to the Bot.

$discord->on(Event::CHANNEL_CREATE, function (Channel $channel, Discord $discord) {
    // ...
});

Channel Update

Called with two Channel objects when a channel is updated.

$discord->on(Event::CHANNEL_UPDATE, function (Channel $channel, Discord $discord, ?Channel $oldChannel) {
    // ...
});

Channel Delete

Called with a Channel object when a channel relevant to the Bot is deleted.

$discord->on(Event::CHANNEL_DELETE, function (Channel $channel, Discord $discord) {
    // ...
});

Channel Pins Update

Called with an object when a message is pinned or unpinned in a text channel. This is not sent when a pinned message is deleted.

$discord->on(Event::CHANNEL_PINS_UPDATE, function ($pins, Discord $discord) {
    // {
    //     "guild_id": "",
    //     "channel_id": "",
    //     "last_pin_timestamp": ""
    // }
});

For direct messages, it only requires the Intents::DIRECT_MESSAGES intent.

Threads

Requires the Intents::GUILDS intent.

Thread Create

Called with a Thread object when a thread is created, relevant to the Bot.

$discord->on(Event::THREAD_CREATE, function (Thread $thread, Discord $discord) {
    // ...
});

Thread Update

Called with a Thread object when a thread is updated.

$discord->on(Event::THREAD_UPDATE, function (Thread $thread, Discord $discord, ?Thread $oldThread) {
    // ...
});

Thread Delete

Called with an old Thread object when a thread relevant to the Bot is deleted.

$discord->on(Event::THREAD_DELETE, function (object $thread, Discord $discord) {
    if ($thread instanceof Thread) {
        // $thread was cached
    }
    // $thread was not in cache:
    else {
    // {
    //     "type": 0,
    //     "id": "",
    //     "guild_id": "",
    //     "parent_id": ""
    // }
    }
});

Thread List Sync

Called when list of threads are synced.

$discord->on(Event::THREAD_LIST_SYNC, function (Collection $threads, Discord $discord) {
    // ...
});

Thread Member Update

Called with a Thread Member object when the thread member for the current Bot is updated.

// use Discord\Parts\Thread\Member;

$discord->on(Event::THREAD_MEMBER_UPDATE, function (Member $threadMember, Discord $discord) {
    // ...
});

Thread Members Update

Called with a Thread object when anyone is added to or removed from a thread. If the Bot does not have the Intents::GUILD_MEMBERS, then this event will only be called if the Bot was added to or removed from the thread.

$discord->on(Event::THREAD_MEMBERS_UPDATE, function (Thread $thread, Discord $discord) {
    // ...
});
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.
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
anil/file-picker
broqit/fields-ai