Find the guide or API for a common bot task
Find a task below and follow its link to the guide section or reference page that covers it. Unfamiliar terms are defined in the glossary
Start
- Create a Fluxer application and get its token
- Add the bot to a community
- Run a first bot that answers !ping
- Build a bot with commands, a welcome message and clean shutdown
- Understand clients, events, Results and caches
- Run code when the bot is connected
- Copy a complete example bot
Messages
- Reply to a message and check the result
- Mention a user or role safely
- Edit a sent message
- Send an embed
- Attach or download a file
- Send a direct message
- Add a reaction to a message
- Delete a message
- Clear recent messages in a channel
- Use custom emoji and stickers
- Post through a webhook without a bot connection
- Look up every message method
Commands
- Register prefix commands
- Parse command arguments
- Restrict a command with guards, cooldowns or middleware
- Generate a help command
- Configure commands in runBot
- Look up the built-in guards
Events
- Welcome new members
- Wait for one future event
- Ask a question and collect the reply
- Collect reactions
- Check whether one user reacted
- Run code around every handler
- Look up the handler registration options
Communities and Permissions
- Read a community and its members
- Check permissions
- Check whether the bot or a moderator outranks a member
- Give a member a role
- Give a role an icon
- Kick, ban or time out a member
- Look up member and role methods
Data and Cache
- Search or scan message history
- Turn on and size the caches
- Read from the cache and fetch when data is missing
- Call a Fluxer API route that has no SDK method
- Ask for a person's consent with OAuth
- Keep data across restarts
Production
- Choose client options
- Read and configure log output
- Set the bot's status
- Schedule a task or reminder
- Handle failures that have no Result
- Retry a failed request safely
- Stop the bot cleanly
- Deploy the bot
- Split a large bot into shards
- Watch subscriptions and finish application work before exit
- Look up every client option
Testing
- Test a bot without Fluxer
- Test a runBot bot with its own options
- Test handlers registered with client.on
- Look up the test client
Effect
- Write a first bot with Effect
- Handle failures, collect replies and run reads together
- Provide the client as a service and test with Layers
- Test a native runBot bot against an in-memory Fluxer
- Look up the Effect entry point
- Look up the Effect test client