-
Notifications
You must be signed in to change notification settings - Fork 237
Invites
Alexander Maassen edited this page May 22, 2023
·
1 revision
Requires the Intents::GUILD_INVITES
intent and manage_channels
permission.
Called with an Invite
object when a new invite to a channel is created.
$discord->on(Event::INVITE_CREATE, function (Invite $invite, Discord $discord) {
// ...
});
Called with an object when an invite is created.
$discord->on(Event::INVITE_DELETE, function (object $invite, Discord $discord) {
if ($invite instanceof Invite) {
// $invite was cached
}
// If $invite was not in cache:
else {
// {
// "channel_id": "",
// "guild_id": "",
// "code": "" // the unique invite code
// }
}
});
Note: This wiki is currently Work In Progress. Consider reading the docs instead.
- Application Command (Slash based)
Command Client (Message based)
- Activity
- Application
- Guild
- Private Channel
- User
Components
-
ActionRow
- Buttons
- Option (commands)
- SelectMenu
- TextInput
Builders