Loading...
Where the token comes from, how the bot joins your server — and where VyroAI stores it.
VyroAI writes and runs your bot, but Discord will only let it act as your bot if you give it a token. The token is created on Discord's own developer site, not on VyroAI — it is the one step that happens outside the app.
This is the field step 3 means. Drawn from the app's own control list, so it can never go stale like a screenshot.
The invite link opens, you pick your server, and Discord refuses with This integration requires code grant. Nothing is wrong with your bot or your token.
It is one switch in the Developer Portal. Requires OAuth2 Code Grant is meant for apps that send a person through a login screen and back to a website of their own. A normal bot has no such website, so the switch must be off — with it on, Discord waits for a step that never comes and refuses the invite.
bot and applications.commands — the second one is what makes your slash commands appear in the serverOn the same Bot page as your token there is a group called Privileged Gateway Intents. Discord keeps three things behind it, because they let a bot see far more than it needs for most jobs:
!prefix commands and for anything that reacts to the words in a message.Turn on only what your bot needs, and remember it has to be asked for in the code as well — the portal grants the permission, the code requests it.
If the bot dies the moment it starts and the console prints Used disallowed intents, your code is asking for something the switch has not granted. It is never a token problem, and restarting on its own will not help.
Go to the Bot page, switch on the intent your code asks for, save, then press Start in the Bot Console. The bot is stopped after that error, so there is no Restart button to press — the panel only draws it while a bot is running. If you would rather go the other way — the bot does not really need it — ask the AI in chat to take that intent out of the code.
This is the part to read twice. Pressing Save Token — or simply clicking out of the token field — writes DISCORD_TOKEN=<your token> into a .env file inside the project, creating that file if there is none, and saves the project to the cloud. Your bot needs it there to log in.
So the token is now part of your project — but not everything that leaves VyroAI carries it any more:
.env behind. Secret files are held back from the push and counted in the message you get afterwards, so your token does not reach the repository — not even a public one..env with a blanked .env.example, so the token stays behind..env with your token.You no longer have to take the token out by hand before a push — the push leaves the whole file behind for you. If a token ever does get out, regenerate it on Discord immediately — the old one dies the moment you do.
A bot token is a password in every other sense too. Never paste it into a chat or a screenshot.
Other secrets — ones your bot does not need on disk — belong in the Secret Vault, and the chat will warn you before you send them to the AI by accident.
3 of 10 in Discord Bots · Last checked 17 September 2026 · Previous: Bot Generator