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

Guilds represent Discord 'servers'.

Repositories

name type notes
roles Role
emojis Emoji
members Member May not contain offline members, see the loadAllMembers option
channels Channel
stage_instances StageInstance
guild_scheduled_events ScheduledEvent
stickers Sticker
invites Invite Not initially loaded
bans Ban Not initially loaded without retrieveBans option
commands Command Not initially loaded
templates GuildTemplate Not initially loaded
integrations Integration Not initially loaded

Creating a role

Shortcut for $guild->roles->save($role);. Takes an array of parameters for a role and returns a role part in a promise.

Parameters

name type description default
name string Role name new role
permissions string Bitwise value of permissions @everyone permissions
color integer RGB color value 0
hoist bool Hoisted role? false
icon string image data for Role icon null
unicode_emoji string unicode emoji for Role icon null
mentionable bool Mentionable role? false
$guild->createRole([
    'name' => 'New Role',
    // ...
])->then(function (Role $role) {
    // ...
});

Transferring ownership of guild

Transfers the ownership of the guild to another member. The bot must own the guild to be able to transfer ownership. Takes a member object or a member ID and returns nothing in a promise.

Parameters

name type description
member Member or member ID The member to get ownership
reason string Reason for Audit Log
$guild->transferOwnership($member)->then(...);
// or
$guild->transferOwnership('member_id')->then(...);

Unbanning a member with a User or user ID

Unbans a member when passed a User object or a user ID. If you have the ban object, you can do $guild->bans->delete($ban);. Returns nothing in a promise.

Parameters

name type description
user_id User or user ID The user to unban
$guild->unban($user)->then(...);
// or
$guild->unban('user_id')->then(...);

Querying the Guild audit log

Takes an array of parameters to query the audit log for the guild. Returns an Audit Log object inside a promise.

Parameters

name type description
user_id string, int, Member, User Filters audit log by who performed the action
action_type Entry constants Filters audit log by the type of action
before string, int, Entry Retrieves audit logs before the given audit log object
limit int between 1 and 100 Limits the amount of audit log entries to return
$guild->getAuditLog([
    'user_id' => '123456',
    'action_type' => Entry::CHANNEL_CREATE,
    'before' => $anotherEntry,
    'limit' => 12,
])->then(function (AuditLog $auditLog) {
    foreach ($auditLog->audit_log_entries as $entry) {
        // $entry->...
    }
});

Creating an Emoji

Takes an array of parameters for an emoji and returns an emoji part in a promise. Use the second parameter to specify local file path instead.

Parameters

name type description default
name string Emoji name required
image string image data with base64 format, ignored if file path is specified
roles array Role IDs that are allowed to use the emoji []
$guild->createEmoji([
    'name' => 'elephpant',
    // ...
],
'/path/to/file.jpg',
'audit-log reason'
)->then(function (Emoji $emoji) {
    // ...
});
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