DiscordPHP Documentation

Intents
in package

Contains constants used in intents.

Tags
link
https://discord.com/developers/docs/topics/gateway#gateway-intents
since
5.0.0

Table of Contents

AUTO_MODERATION_CONFIGURATION  = 1 << 20
Auto moderation rule events.
AUTO_MODERATION_EXECUTION  = 1 << 21
Auto moderation execution events.
DIRECT_MESSAGE_REACTIONS  = 1 << 13
Direct message reaction events.
DIRECT_MESSAGE_TYPING  = 1 << 14
Direct message typing events.
DIRECT_MESSAGES  = 1 << 12
Direct message events.
GUILD_EMOJIS_AND_STICKERS  = 1 << 3
Guild emoji and sticker events.
GUILD_INTEGRATIONS  = 1 << 4
Guild integration events.
GUILD_INVITES  = 1 << 6
Guild invite events.
GUILD_MEMBERS  = 1 << 1
Guild member events (Privileged).
GUILD_MESSAGE_REACTIONS  = 1 << 10
Guild message reaction events.
GUILD_MESSAGE_TYPING  = 1 << 11
Guild typing events.
GUILD_MESSAGES  = 1 << 9
Guild message events.
GUILD_MODERATION  = 1 << 2
Guild moderation events.
GUILD_PRESENCES  = 1 << 8
Guild presence events (Privileged).
GUILD_SCHEDULED_EVENTS  = 1 << 16
Guild scheduled events events.
GUILD_VOICE_STATES  = 1 << 7
Guild voice state events.
GUILD_WEBHOOKS  = 1 << 5
Guild webhook events.
GUILDS  = 1 << 0
Guilds events.
MESSAGE_CONTENT  = 1 << 15
Message content intent (Privileged).
getAllIntents()  : int
Returns an integer value that represents all intents.
getDefaultIntents()  : int
Returns an integer value that represents the default intents.
getIntentArray()  : array<string|int, string>
Converts an integer intent representation into an array of strings, representing the enabled intents. Useful for debugging.
getValidIntents()  : array<string|int, mixed>
Returns an array of valid intents.

Constants

AUTO_MODERATION_CONFIGURATION

Auto moderation rule events.

public mixed AUTO_MODERATION_CONFIGURATION = 1 << 20
  • AUTO_MODERATION_RULE_CREATE
  • AUTO_MODERATION_RULE_UPDATE
  • AUTO_MODERATION_RULE_DELETE

AUTO_MODERATION_EXECUTION

Auto moderation execution events.

public mixed AUTO_MODERATION_EXECUTION = 1 << 21
  • AUTO_MODERATION_ACTION_EXECUTION

DIRECT_MESSAGE_REACTIONS

Direct message reaction events.

public mixed DIRECT_MESSAGE_REACTIONS = 1 << 13
  • MESSAGE_REACTION_ADD
  • MESSAGE_REACTION_REMOVE
  • MESSAGE_REACTION_REMOVE_ALL
  • MESSAGE_REACTION_REMOVE_EMOJI

DIRECT_MESSAGE_TYPING

Direct message typing events.

public mixed DIRECT_MESSAGE_TYPING = 1 << 14
  • TYPING_START

DIRECT_MESSAGES

Direct message events.

public mixed DIRECT_MESSAGES = 1 << 12
  • CHANNEL_CREATE
  • MESSAGE_CREATE
  • MESSAGE_UPDATE
  • MESSAGE_DELETE
  • CHANNEL_PINS_UPDATE

GUILD_EMOJIS_AND_STICKERS

Guild emoji and sticker events.

public mixed GUILD_EMOJIS_AND_STICKERS = 1 << 3
  • GUILD_EMOJIS_UPDATE
  • GUILD_STICKERS_UPDATE

GUILD_INTEGRATIONS

Guild integration events.

public mixed GUILD_INTEGRATIONS = 1 << 4
  • GUILD_INTEGRATIONS_UPDATE
  • INTEGRATION_CREATE
  • INTEGRATION_UPDATE
  • INTEGRATION_DELETE

GUILD_INVITES

Guild invite events.

public mixed GUILD_INVITES = 1 << 6
  • INVITE_CREATE
  • INVITE_DELETE

GUILD_MEMBERS

Guild member events (Privileged).

public mixed GUILD_MEMBERS = 1 << 1
  • GUILD_MEMBER_ADD
  • GUILD_MEMBER_UPDATE
  • GUILD_MEMBER_REMOVE

GUILD_MESSAGE_REACTIONS

Guild message reaction events.

public mixed GUILD_MESSAGE_REACTIONS = 1 << 10
  • MESSAGE_REACTION_ADD
  • MESSAGE_REACTION_REMOVE
  • MESSAGE_REACTION_REMOVE_ALL
  • MESSAGE_REACTION_REMOVE_EMOJI

GUILD_MESSAGE_TYPING

Guild typing events.

public mixed GUILD_MESSAGE_TYPING = 1 << 11
  • TYPING_START

GUILD_MESSAGES

Guild message events.

public mixed GUILD_MESSAGES = 1 << 9
  • MESSAGE_CREATE
  • MESSAGE_UPDATE
  • MESSAGE_DELETE
  • MESSAGE_DELETE_BULK

GUILD_MODERATION

Guild moderation events.

public mixed GUILD_MODERATION = 1 << 2
  • GUILD_AUDIT_LOG_ENTRY_CREATE
  • GUILD_BAN_ADD
  • GUILD_BAN_REMOVE

GUILD_PRESENCES

Guild presence events (Privileged).

public mixed GUILD_PRESENCES = 1 << 8
  • PRESENCE_UPDATE

GUILD_SCHEDULED_EVENTS

Guild scheduled events events.

public mixed GUILD_SCHEDULED_EVENTS = 1 << 16
  • GUILD_SCHEDULED_EVENT_CREATE
  • GUILD_SCHEDULED_EVENT_UPDATE
  • GUILD_SCHEDULED_EVENT_DELETE
  • GUILD_SCHEDULED_EVENT_USER_ADD
  • GUILD_SCHEDULED_EVENT_USER_REMOVE

GUILD_VOICE_STATES

Guild voice state events.

public mixed GUILD_VOICE_STATES = 1 << 7
  • VOICE_STATE_UPDATE

GUILD_WEBHOOKS

Guild webhook events.

public mixed GUILD_WEBHOOKS = 1 << 5
  • WEBHOOKS_UPDATE

GUILDS

Guilds events.

public mixed GUILDS = 1 << 0
  • GUILD_CREATE
  • GUILD_UPDATE
  • GUILD_DELETE
  • GUILD_ROLE_CREATE
  • GUILD_ROLE_UPDATE
  • GUILD_ROLE_DELETE
  • CHANNEL_CREATE
  • CHANNEL_UPDATE
  • CHANNEL_DELETE
  • CHANNEL_PINS_UPDATE
  • STAGE_INSTANCE_CREATE
  • STAGE_INSTANCE_UPDATE
  • STAGE_INSTANCE_DELETE

Methods

getAllIntents()

Returns an integer value that represents all intents.

public static getAllIntents() : int
Return values
int

getDefaultIntents()

Returns an integer value that represents the default intents.

public static getDefaultIntents() : int

This is all intents minus the privileged intents.

Return values
int

getIntentArray()

Converts an integer intent representation into an array of strings, representing the enabled intents. Useful for debugging.

public static getIntentArray(int $intents) : array<string|int, string>
Parameters
$intents : int
Return values
array<string|int, string>

getValidIntents()

Returns an array of valid intents.

public static getValidIntents() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results