Bots, control NextCore Browser from Discord
Connect a Discord bot to NextCore Browser to check status, assign work and tap Approve or Decline on permission requests right from chat, including from your phone.
What it does
Bots lets you command NextCore Browser by chat, without sitting at the machine. This version supports Discord.
The bot runs inside the app, on your main machine. The app connects out to Discord on its own; no port is opened on your machine.
You type a command starting with / in the channel you picked, and you can do four things:
- See what the machines and agent tabs are doing.
- See how many jobs are waiting and how many are running.
- See what is waiting for you: permission requests, questions, jobs that need a person.
- Assign a new job. Each job gets its own thread, the bot posts progress summaries there, and a tab's permission request shows up as a message with Approve and Decline buttons.
Every setting lives in Settings › External connections › Bots.
Before you start: create the Discord bot
You create your own Discord application, because the bot is yours. Do it once, it takes a few minutes:
- Open discord.com/developers, click New Application, give it a name.
- Open Bot, click Reset Token and copy the token. Turn on Message Content Intent.
- Open OAuth2, pick
botandapplications.commands, then invite the bot to your server. - Give the bot View Channel and Send Messages in the channel you plan to use.
The token is the bot's password. Do not share it and do not paste it into chat.
Connect the bot
Open Settings › External connections › Bots, card Discord bot connection:
- Paste the token into Bot token. Click Show to recheck what you pasted.
- Click Save and connect. The app asks Discord whether the token is valid before saving. A wrong token saves nothing and the app tells you why.
- The chip next to the title changes to Connected.
After saving, the field shows only the last characters, and the app never shows the full token again. To switch bots, paste a new token into the same field. Click Disconnect to turn the bot off and keep the settings.
| Chip | Meaning |
|---|---|
| Not connected | No token yet |
| Connecting | Turned on, reaching Discord |
| Connected | Bot is online and receives commands |
| Connection error | Discord refused: check the token and the bot's permissions |
| Off | A token exists but you disconnected |
| Runs on the main machine | You opened the app on a machine that is not the main one, where the bot actually runs |
Where commands arrive
Card Where commands arrive has two fields: Server and Channel. The lists come straight from Discord and only include servers the bot was invited to and text channels in that server. Pick the server first, then the channel. Each job given through the bot opens its own thread in this channel.
Click Send test and the bot posts a message in the chosen channel. If it appears, the token, the server and the send permission are all fine.
Who can give commands
By default only the owner can give commands. The first time you click Save and connect, the app puts the owner of the Discord application first in the list.
To add someone, paste their Discord user ID (a string of digits) into the field at the bottom of the card and click Add. To get an ID: in Discord open Settings › Advanced and turn on Developer Mode, right-click the person's name, choose Copy User ID. The app looks the person up on Discord so you can see you picked the right one before adding.
Click Remove to drop someone. The owner cannot be removed. Anyone outside the list who types a command gets «You are not allowed to use this bot» and can read nothing.
Commands in Discord
| Command | What it does |
|---|---|
/ |
Summary of machines and agent tabs: how many tabs are working, how many are free, which machine lost its connection |
/ |
How many jobs are waiting and how many are running |
/ |
What is waiting for you: tab permission requests, questions, jobs that need a person |
/ |
Assign a job. Put the text in viec; issue is the GitHub issue number; may is the target machine name, leave empty to let the app choose |
Every job must carry a GitHub issue number: fill issue or write #number in the text.
A job given through / opens its own thread, and the bot posts a summary there each time the status changes.
When a tab stops and waits for your permission, the bot sends a message with Approve and Decline buttons. Tapping one makes the tab continue or stop accordingly. Only the person who assigned that job, or the owner, can tap. Buttons expire after 6 hours or when the app restarts; an old button gets an «expired» reply.
Permission mode
Card Permission mode has four levels, modeled on Orca Bots:
| Level | Meaning |
|---|---|
| Ask for approval (default) | Writing files and running commands both ask you through Approve or Decline |
| Accept edits | File edits are approved for you, commands still ask |
| Approve for me | Most things are approved for you; deleting, pushing and spending money still ask |
| Full access | Never asks. Only use on a private machine and a private channel |
Choosing Full access takes two clicks to confirm.
Note: this version only saves your choice. The approval buttons currently always ask you to Approve or Decline before running, whichever level you pick. Applying each level to the buttons comes in a later version.
Safety
- The bot token is encrypted by the operating system on this machine and never sent to the NextCore server. If the machine cannot encrypt, the app says so and keeps the token for the session only, so you paste it again after reopening the app.
- The bot only runs on the main machine. Other machines can only view and edit the settings.
- The AI agents in the app cannot change the token, the list of people who can give commands or the permission mode. Only you can, by hand, on this screen.
- Every command typed to the bot is logged, including refused ones.
Common problems
| What you see | What to do |
|---|---|
| «The token is wrong or was reset» | Go to discord.com/developers › Bot › Reset Token, paste the new token and click Save and connect |
| The server list is empty | The bot has not been invited to any server. Invite it with the application's OAuth2 link, then click Try again |
| «The bot cannot send messages in this channel» on Send test | In Discord open the channel settings and give the bot View Channel and Send Messages |
| Chip «Runs on the main machine» | You are looking at a machine that is not the main one. Open the app on the main machine for the bot to work |
/ commands do not show in Discord |
Wait a few minutes after connecting, and make sure applications.commands was ticked when you invited the bot |
| «User not found» when adding someone | The ID is wrong or has a space. Copy it again with Copy User ID |
| «Name not found yet» next to a person | Normal on a slow network. They can still give commands by ID |
| You must paste the token again after reopening the app | This machine cannot encrypt the token, so it is kept for the session only. See the yellow note under the token field |
Related
- NextCore Command: assign work, pick a machine, watch the flow in the app.
- NEXTCORE TERMINAL: the agent tabs the bot assigns work to.
- Settings: the other settings groups.