Definitions
A quick reference guide to the specific jargon used in the discord.js ecosystem. Understanding these terms is crucial for reading documentation and troubleshooting errors.
| Term | Definition |
|---|---|
| Guild | The API’s technical name for a Server. If you see interaction.guild, it refers to the specific server where the command was run. |
| User vs Member | User: Global account data (Username, Avatar, ID). Same across all of Discord. |
| Slash Command | A command triggered by typing /. These are technically called “Application Commands” and are the modern standard for interacting with Discord bots. |
| Interaction | The data packet sent to your bot when a user performs an action (uses a command, clicks a button, selects a menu). You must reply or acknowledge an interaction (e.g., .reply()) within 3 seconds or it will throw an error. |
| Embed | A rich-text message box that allows for advanced formatting, colors, images, thumbnails, and fields. Used via the EmbedBuilder class. |
| Flags | A way of combining multiple settings or permissions into a single value using “Bitfields.” Used for things like GatewayIntentBits (what the bot listens to) or MessageFlags (properties of a message). |
| Intents | ”Subscriptions” you set when starting the bot. They tell Discord which events (like new messages or members joining) your bot actually cares about. If you don’t enable an Intent, the bot won’t receive those events. |
| Ephemeral | (MessageFlags.Ephemeral) A message flag that makes a response visible only to the user who ran the command. Sometimes called a “ghost message.” Useful for error messages or private data. |
| Snowflake | The technical name for a Discord ID (e.g., User ID, Channel ID). It is a long string of numbers unique to that specific object (e.g., 1068554282481229885). |
| Collection | A custom utility structure used by discord.js (similar to a JavaScript Map). It is used to store cached data, such as guild.members.cache. |
| Token | The “password” for your bot found in the Developer Portal. Never share this. Anyone with the token can control your bot. |