Build bots for Fluxer
Fluxer.js holds the gateway connection open, retries rate-limited requests, and caches the objects you touch. You write the handlers.
There are no intents to declare. Construct a Client, log in with a bot token, and the events you subscribed to start arriving.
pnpm add @fluxerjs/coreApache-2.0Node 22.13+Types includedChangelog
import { Client, Events } from '@fluxerjs/core';
const client = new Client();
client.on(Events.Ready, () => {
console.log('Ready!');
});
client.on(Events.MessageCreate, async (message) => {
if (message.author.bot) return;
if (message.content === '!ping') {
await message.reply('Pong!');
}
});
await client.login(process.env.FLUXER_BOT_TOKEN);A complete bot that replies to !ping. See the shorter version or add real commands.
npm downloads
Adoption at a glance
Across 10 published packages
Total installs
121k
Last 30 days
24.6k
Weekly downloads
Peak week 11k downloads
Start here
Install, write a first bot, then look up the rest.
Installation
Node 22.13 or newer, one package, one token, and a client that logs in.
NextBasic bot
Wait for Ready, match !ping, reply. Everything else builds on this file.
CommandsPrefix commands
Parse !commands, reply, and grow from a single file into a map of handlers.
Look upWhere do I…?
A task index that jumps to the guide and method for the job.
What the library handles
The parts you would otherwise write yourself, and the guide for each.
Gateway events
Subscribe with client.on and handlers get typed payloads. Reconnects and resumes happen without you watching the socket.
Call methods on objects
Fetch a thing and call methods on it: message.reply, channel.send, member.kick.
Caching you can see
Managers cover the day-to-day reads. client.cache is where the per-cache limits, sweeps, and stats live when memory starts to matter.
Builders that serialize themselves
Pass an EmbedBuilder or AttachmentBuilder straight into channel.send. No toJSON call of your own.
Collectors with bounds
awaitMessages and awaitReactions for confirmations and polls. A collector without time or max throws instead of leaking.
Permission checks
member.permissions for guild-level roles, member.permissionsIn when channel overwrites decide the answer.
Look something up
Or press Ctrl K and search all of it at once.
Where do I…?
When you know the task but not the page.
- Send, reply, or forward
- Send in a voice channel
- Embeds and files
- Fetch or search history
- Reactions and collectors
- Channels, overwrites, links
- Roles and permissions
- Kick, ban, or timeout
- Emojis and stickers
- Webhooks
- Invites and vanity URLs
- Direct messages
One thing to know about voice
Guild voice channels are text-based, so channel.send already works in them. Actual audio lives in @fluxerjs/voice, which is being reworked. Read the voice guide before you depend on it.