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

Parts is the term used for the data structures inside Discord. All parts share a common set of attributes and methods.

Parts have a set list of fillable fields. If you attempt to set a field that is not accessible, it will not warn you.

To create a part object, you can use the new syntax or the factory method. For example, creating a Message part:

$message = new Message($discord);
// or
$message = $discord->factory->create(Message::class);

Part attributes can be accessed similar to an object or like an array:

$message->content = 'hello!';
// or
$message['content'] = 'hello!';

echo $message->content;
// or
echo $message['content'];

Filling a part with data

The ->fill(array $attributes) function takes an array of attributes to fill the part. If a field is found that is not 'fillable', it is skipped.

$message->fill([
    'content' => 'hello!',
]);

Getting the raw attributes of a part

The ->getRawAttributes() function returns the array representation of the part.

$attributes = $message->getRawAttributes();
/**
 * [
 *     "id" => "",
 *     "content" => "",
 *     // ...
 * ]
 */
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