Where do I...?
Task index for common bot jobs, with the guide and SDK method to use.
Know the job, not the page name? Start here. Each row is a task, then the guide, then the usual SDK call.
Messages
| Task | Guide | SDK |
|---|---|---|
| Send in a text or voice channel | Sending Messages | channel.send(), channel.isTextBased() |
| Reply without a ping | Sending Messages | message.reply(text, { ping: false }) |
| Forward a message | Sending Messages | channel.send({ forward: { channelId, messageId } }) |
| Embeds | Embeds | EmbedBuilder into reply / send |
| Attach a file | File Attachments | AttachmentBuilder or { name, url } |
| Fetch recent messages | Message History | channel.messages.fetch({ limit }) |
| Preload several channels (bots) | Message History | client.preloadMessages(ids) |
| Search messages (bots) | Message History | client.searchMessages({ content, contextGuildId }) |
| React / collect | Reactions, Collectors | message.react(), awaitMessages |
| Webhook send | Webhooks | channel.createWebhook(), webhook.send() |
Do not use client.bulkFetchMessages on a bot token. That route is user-account only.
Guilds
| Task | Guide | SDK |
|---|---|---|
| Create or edit a channel | Channels | guild.createChannel(), channel.edit() |
| Link channel (URL, no send) | Channels | ChannelType.GuildLink, channel.isLink() |
| Permission overwrites | Channels, Permissions | channel.permissionOverwrites.edit() |
| Roles | Roles | guild.createRole({ name, color, permissions }) |
| Kick / ban / timeout | Moderation | member.kick(), member.ban(), member.timeout(ms) |
| Search members | Member Search | guild.members.search({ query }) |
| Emojis / stickers | Emojis & Stickers | guild.cloneEmoji(), guild.createEmojisBulk() |
| Invites / vanity | Invites | channel.createInvite(), guild.fetchVanityURL() |
| Content warnings | Content Warnings | channel.edit({ contentWarningLevel }) |
| List the guild in discovery | Server Discovery | guild.applyForDiscovery() |
Client
| Task | Guide | SDK |
|---|---|---|
| First bot | Basic Bot | client.login(), Events.MessageCreate |
Prefix !commands | Prefix Commands | parsePrefixCommand |
| Errors | Errors | FluxerError, ErrorCodes |
| Cache limits / sweeps | Caching | client.cache |
| Presence | Presence | client.user.setPresence() |
| DMs | Direct Messages | user.send() |
| Friendly bot flags | Users & Bots | UserFlagsBits.FriendlyBot |
| User with profile | Users & Bots | client.users.fetchWithProfile(id) |
| Application object | Users & Bots | client.fetchOAuthApplications() |
| Live member/online counts | Events | client.requestGuildCounts({ guildIds }) |
| Per-channel member counts (event only) | Events | client.requestChannelMemberCounts({ guildId }) |
| Self-hosted instance | Discovery | Client.fromDiscovery(origin) |
| Scale across shards | Sharding | @fluxerjs/sharding |
| Play audio in VC | Voice | @fluxerjs/voice (being reworked) |
Voice text (chat in a voice channel) is Sending Messages, not the voice package.