Create the application, copy its token and invite the bot to a community
A Fluxer bot is an application with its own bot account. This page creates the application, keeps its token private and adds the bot to a community, which is what the API calls a guild. The quick start then makes the bot answer its first command
What Is Needed
- Node.js 24.15 or newer, which Fluxerly is tested against. Run
node --versionto check - A registered Fluxer account. If the Fluxer app shows Claim account, use it first to add an email and password, because an unclaimed account cannot create applications
- A community where that account has the
ManageorGuild Administratorpermission, such as a private test community
1. Create the Application
- Sign in to Fluxer with the account that should own the bot
- Open User settings with the gear button next to the microphone and speaker buttons
- Under Developer, choose Applications
- Choose Create application, enter an Application name and choose Create
Fluxer creates the bot account together with the application and opens the application's page. The bot's username comes from the application name when that name is available, otherwise Fluxer picks another one
The page shows the Application ID with a Copy ID button. Note it for the invite link below. It is not secret, and the bot account's user ID is the same number
Fluxer's API reference describes what creating an application returns
2. Copy the Token
On the application's page, the Secrets & tokens section shows the Bot token. Fluxer shows the token only right after the application is created or after Regenerate, so copy it now and keep it somewhere private, such as a password manager, until the quick start saves it in the bot's .env file. Anyone holding the token can act as the bot, so keep it out of source code, chat messages, screenshots and logs
If the Token Leaks or Gets Lost
Choose Regenerate next to the bot token. The old token stops working at once, and every running copy of the bot is disconnected. Put the new token in .env and start the bot again
A token has the form <application_, so the part before the dot is the application ID. Fluxer's token formats and credential handling notes cover the details
3. Invite the Bot to a Community
An invite link opens Fluxer's page for adding the bot to a community. The quick start needs three permissions:
View, to see the channel where a command is typedChannel Send, to replyMessages Read, to read earlier messages in the channelMessage History
Together these make the permission value 68608. Replace APPLICATION_ in this link with the application ID, then open it in a browser:
https://api.fluxer.app/v1/oauth2/authorize?client_id=APPLICATION_ID&scope=bot&permissions=68608
Fluxer asks which account to use, then which community to add the bot to, and shows the requested permissions. Choose Authorise on the last step. Fluxer creates a role named after the application with exactly these permissions and gives it to the bot
The application's page also has an OAuth2 URL builder section that builds such a link from chosen scopes and Bot permissions
If the Bot Cannot Be Added
- Adding a bot needs the
ManageorGuild Administratorpermission in the chosen community - Only an administrator can give the bot a permission that the person adding it does not have
- A private bot can be added only by the account that owns the application
- A bot that is already in the community cannot be added again
The role Fluxer creates for the bot stays in the community if the bot leaves. The consent step in Fluxer's API reference lists every outcome
Optionally, once the quick start has installed the SDK, links builds the same link in code. It checks the ID and the permission names, so a typo fails instead of producing a broken link:
import { links, permissionBits } from "@neontechspace/fluxerly"
const applicationId = process.argv[2] ?? ""
const permissions = permissionBits.from(["ViewChannel", "SendMessages", "ReadMessageHistory"])
console.log(links.installation(applicationId, { permissions }))
import { links, permissionBits } from "@neontechspace/fluxerly"
const applicationId = process.argv[2] ?? ""
const permissions = permissionBits.from(["ViewChannel", "SendMessages", "ReadMessageHistory"])
console.log(links.installation(applicationId, { permissions }))
Save it as invite.js in the bot's folder, or invite.ts for TypeScript, and run it with the application ID, such as node invite
Next
Continue with the quick start to generate the project, save the token in it and answer !ping