In discord.js v14, intent flags are available from GatewayIntentBits
.
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Discord.Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
]
})
List of changes:
v12/v13 | v14 |
---|---|
GUILDS |
GatewayIntentBits.Guilds |
GUILD_BANS |
GatewayIntentBits.GuildBans |
GUILD_EMOJIS_AND_STICKERS |
GatewayIntentBits.GuildEmojisAndStickers |
GUILD_INTEGRATIONS |
GatewayIntentBits.GuildIntegrations |
GUILD_INVITES |
GatewayIntentBits.GuildInvites |
GUILD_MEMBERS |
GatewayIntentBits.GuildMembers |
GUILD_MESSAGE_REACTIONS |
GatewayIntentBits.GuildMessageReactions |
GUILD_MESSAGE_TYPING |
GatewayIntentBits.GuildMessageTyping |
GUILD_MESSAGES |
GatewayIntentBits.GuildMessages |
GUILD_PRESENCES |
GatewayIntentBits.GuildPresences |
GUILD_SCHEDULED_EVENTS |
GatewayIntentBits.GuildScheduledEvents |
GUILD_VOICE_STATES |
GatewayIntentBits.GuildVoiceStates |
GUILD_WEBHOOKS |
GatewayIntentBits.GuildWebhooks |
DIRECT_MESSAGES |
GatewayIntentBits.DirectMessages |
DIRECT_MESSAGE_TYPING |
GatewayIntentBits.DirectMessageTyping |
DIRECT_MESSAGE_REACTIONS |
GatewayIntentBits.DirectMessageReactions |
N/A | GatewayIntentBits.MessageContent |