Discord + Deskfolk setup guide
Connect your own Discord bot so people in your servers can ask your Deskfolk AI teammates with /ask, and so your teammates can read channels, post updates and help run your server when you ask them in chat.
What your AI teammate can do
- Answer /ask: anyone in a server your bot is in (or in a direct message with the bot) types
/askand their request. Your teammate answers right there. - Servers and channels: list the servers your bot is in, their channels, threads, roles and scheduled events, and find members by name.
- Read recent messages in a channel, thread or direct message the bot can see, and the pinned messages.
- Send a message to a channel or thread (or a direct message to a member), reply to a message, attach files from your Deskfolk chat, edit a message your bot sent, pin or unpin a message, react with an emoji, start a thread and create a scheduled event, with your OK.
- Delete a message, remove the bot's reaction, and time out, kick, ban or unban a member, with your OK every time.
Prerequisites
- A Deskfolk account on any plan or free trial (you need to be the office owner to connect apps).
- A Discord account, and Manage Server permission on the server you want to add the bot to (to invite it). You don't need to pay for anything.
Add the app (connect Discord)
- Open the Discord Developer Portal at https://discord.com/developers/applications and click New Application. Give it the name people should see (for example "Acme Help") and accept Discord's terms.
- Open Bot in the menu on the left:
- Under Privileged Gateway Intents, switch on Message Content Intent and click Save Changes. It lets your teammate read what people write in channels. (Bots in fewer than 100 servers can switch it on themselves; if you forget, Deskfolk tries to switch it on for you.)
- Click Reset Token, confirm, and copy the token. Discord shows it only once.
- In Deskfolk open Tools, find Discord and click Connect. Paste the token and click Connect bot. Deskfolk checks the token, reads your app's ID and public key, sets your app's Interactions Endpoint URL to Deskfolk, and adds the /ask command.
- On the Discord card, click Add the bot to a server. Discord asks which server and shows the permissions the bot asks for (you can untick any you don't want, for example the moderation ones). Click Authorize.
That's it. In your server, type /ask and your question.
If Discord didn't accept something in step 3, Deskfolk tells you. The usual fix: in the Developer Portal open General Information and check that Interactions Endpoint URL is https://deskfolk.diagonalfrog.com/api/discord/interactions/<your Application ID> (your Application ID is on the same page), then click Save Changes.
Keep the token private: anyone who has it can control your bot. If it leaks, click Reset Token in the Developer Portal and connect again in Deskfolk with the new one.
Permissions the invite link asks for
View channels, send messages (also in threads), read message history, add reactions, embed links, attach files, manage messages (to delete other people's messages), pin messages, create public threads, use slash commands, create and manage events, and for moderation: timeout, kick and ban members. A bot can only moderate people whose highest role is below the bot's role, and never the server owner: drag the bot's role up in Server Settings → Roles if you want it to moderate.
Use it
In any channel the bot can see, or in a direct message with the bot:
/ask is order 1042 on its way?goes to your front desk./ask Mia, what are our opening hours?goes to your teammate Mia (name them at the start).
Discord shows "Acme Help is thinking..." and the answer replaces it a few seconds later. Each Discord channel becomes a chat in Deskfolk (titled "Discord ..."), so you can see everything that was asked and answered. Replies use your credits like any other reply; if your plan isn't active or credits run out, the bot says so and nothing is done. To keep costs in check, a bot answers a limited number of requests every 10 minutes.
In your Deskfolk chat you can also ask your teammate, for example:
- "What did people ask in #support on Discord today?"
- "Post in #announcements on Discord: the office is closed on Friday." → you see the message and the channel, marked Waiting for your OK; reply "yes" to send it.
- "Time out the person spamming #general for an hour." → your teammate finds them and asks for your OK first.
The bot doesn't stay online in Discord's member list (it answers through Discord's slash commands, not a live connection), and it only answers /ask: plain messages and @mentions aren't answered, but your teammate can read them when you ask.
Requests from Discord
Anyone in your server can use /ask, so your teammate treats every Discord request as coming from someone outside your team. It can look things up straight away (your connected apps, your store, your files), but it never changes anything on its own. Every change asked for on Discord - sending, creating, updating or deleting anything in any connected app - waits for your OK. The bot replies that it's waiting for your OK, and the exact change waits for you in that Deskfolk chat, marked Waiting for your OK. Reply "yes" there to do it; anything else cancels it. Nobody on Discord can approve it for you, nothing from Discord is remembered as a fact about your business, and scheduled tasks can't be set up from Discord.
Tip: write an SOP for your front desk saying what it may share with people on Discord. To limit who can use /ask, open Server Settings → Integrations → your bot in Discord and choose the roles and channels.
What asks for your OK first
- Sending a message, a reply or files, editing one of your bot's messages, pinning or unpinning, adding a reaction, starting a thread and creating an event (when you ask in Deskfolk).
- Always, whatever the switch says: deleting a message, removing the bot's reaction, and timing out, kicking, banning or unbanning someone.
- Every change asked for by someone on Discord, in any app.
You can turn Ask before sending off for Discord on the Tools page if you'd rather your teammate sent your own requests without asking. It's on by default, and it never applies to changes asked for on Discord. Answers to /ask are always sent. Your bot's messages never ping @everyone, @here or roles.
Try it safely: Test mode
Office owners can tick Test mode before starting a new chat. Your teammate still reads servers, channels and messages, but nothing is sent: it tells you what it would have done instead. Test replies are free (a set number per day) and nothing from a test chat is remembered.
Remove the app (disconnect Discord)
- In Deskfolk: Tools → Discord → Disconnect. We remove the /ask command and Deskfolk's Interactions Endpoint URL from your app, delete the stored token and any request still waiting, immediately.
- In Discord you can also kick the bot from your server, or delete the application in the Developer Portal. After that your teammate can't reach the bot and Deskfolk shows it as needing a reconnect; click Disconnect in Deskfolk too, so the stored token is deleted.
Data and permissions
Deskfolk doesn't keep copies of your Discord messages: your teammate reads them from Discord when it needs them. A /ask request is kept only until it's answered (at most a day). Without Message Content Intent, Discord hides the text of other people's messages from the bot (messages that mention it, direct messages and its own messages stay readable). Your bot token is encrypted at rest and never shown in the browser. Discord doesn't charge for bots. We never sell your data and don't use it to train AI models. See our Privacy Policy.
Good to know
- Discord messages are at most 2,000 characters; long answers are shortened and the full answer is in Deskfolk.
- A bot can only edit its own messages, and needs the matching permission in each server or channel (check the bot's role, and the channel's Permissions tab).
- A new /ask command can take a little while to show up in Discord the first time; if it's not there, restart Discord.
- Your teammate takes at most 8 app actions in one reply. For a bigger job it does the first part, says what's left, and carries on when you ask (or on a schedule).
Need help?
Use Help & support in Deskfolk or email niko.dev@diagonalfrog.com.