Skip to content

Search documentation

Find a guide in the Raileon documentation

Set up a Discord bot

This page walks you through every step of putting your Raileon AI assistant into your Discord server. No coding is required — you'll create a bot inside Discord, turn on one important setting, invite the bot to your server, and then connect it to Raileon by pasting one secret code (called a "token").

Take it one step at a time and follow the clicks exactly. The whole thing takes about ten minutes.

Coming soon

Channels aren't switched on yet. These guides are published early so you can get familiar with the setup — the steps won't work until channels go live in your dashboard. We'll remove this note the moment they do.

What you'll need

A Discord account that can manage the server you want the assistant in (you'll need permission to add bots to it), and access to your Raileon dashboard. Keep this page open in one browser tab and do the Discord steps in another.

Step 1 — Create your Discord application and bot

Discord requires every bot to belong to an "application." You'll make the application first, then turn it into a bot.

1

Open the Discord Developer Portal

In your web browser, go to https://discord.com/developers/applications. If you're asked to log in, sign in with the same Discord account you use for your server.

2

Create a new application

On the top right of the page, click the New Application button. A small window appears. Type a name for your application — this is just for your own reference, so use something like your company name. Tick the box to agree to Discord's terms, then click Create.

3

Open the Bot settings

You're now on your application's overview page. Look at the menu down the left-hand side and click Bot.

4

Give your bot a name and picture (optional)

On the Bot page you can set the Username and upload an Icon (profile picture). This is what your customers and team will see in Discord, so use your own brand name and logo. Click Save Changes at the bottom if you change anything.

Your brand, front and center

The name and picture you set here are exactly what people see in Discord. Your assistant always appears as your own brand — never as any underlying technology.

Step 2 — Turn on the "Message Content" setting

By default, a Discord bot can see that a message was sent, but it can't read the words inside it. For your assistant to actually understand and answer messages, you must turn on one extra setting called the Message Content Intent.

1

Find the Privileged Gateway Intents

Stay on the Bot page. Scroll down until you see a section titled Privileged Gateway Intents.

2

Switch on Message Content Intent

Find the toggle labelled Message Content Intent and switch it on (it turns blue/green when enabled).

3

Save

Click Save Changes at the bottom of the page.

This step is required

If you skip the Message Content Intent, your assistant will receive blank messages and won't be able to reply with anything useful. If your bot later seems to ignore everyone, come back and double-check this toggle is on.

Step 3 — Copy your bot token (and keep it secret)

The "token" is a long secret password that lets Raileon connect to your bot. You'll copy it now and paste it into Raileon in a later step.

1

Reveal the token

Still on the Bot page, find the Token area near the top (just under your bot's name). Click the Reset Token button. Discord asks you to confirm — click Yes, do it!. You may be asked for your password or a confirmation code.

2

Copy the token

Discord now shows the token once. Click the Copy button to copy it to your clipboard.

3

Keep it somewhere safe for a moment

Paste it temporarily into a private note if you need to, but treat it like a password. You'll paste it into Raileon in Step 6, so you can also just keep this browser tab open until then.

Treat your token like a password

Anyone who has this token can control your bot. Never share it, never post it in a chat, and never email it. If you ever think it has leaked, come back to this page and click Reset Token again to create a fresh one — the old one stops working immediately (which means you'd need to reconnect it in Raileon with the new token). When you connect it to Raileon, your token is stored encrypted and kept private to your workspace.

Step 4 — Invite the bot to your Discord server

Right now your bot exists but isn't in any server. You need to invite it, and this step matters: Raileon can only find the channels your bot has actually been added to. We'll build an invite link with the correct settings.

1

Open the URL Generator

In the left-hand menu of the Developer Portal, click OAuth2, then click URL Generator.

2

Choose the bot scope

You'll see a list of checkboxes under Scopes. Tick the box labelled bot.

3

Choose the bot's permissions

A second list called Bot Permissions now appears below. Tick these three:

  • View Channels
  • Send Messages
  • Read Message History

These let your assistant see your channels and reply in them.

4

Copy the generated invite link

Scroll to the very bottom of the page. Discord has built a long web link (the Generated URL). Click Copy next to it.

5

Open the link and add the bot

Paste that link into a new browser tab and press Enter. Discord shows a page asking which server to add the bot to. Pick your server from the Add to Server dropdown, click Continue, leave the permissions ticked, then click Authorize. Complete the "I'm not a robot" check if it appears.

6

Confirm the bot joined

Open Discord and go to your server. You should now see your bot listed in the member list on the right (it will show as offline for now — that's normal until Raileon connects it).

Why this matters

Raileon discovers your channels by asking Discord which servers your bot has joined. If the bot isn't in a server yet, the channel list in the next steps will come back empty. Make sure the bot has joined your server before moving on.

Step 5 — Open Channels in your Raileon dashboard

Now switch over to Raileon.

1

Go to Channels

Sign in to your Raileon dashboard and open the Channels page from the menu.

2

Find the Connect a bot section

At the top you'll see Connect a bot, with a short note explaining you can paste a bot token to verify it and find the channels it can serve.

Step 6 — Connect your bot by pasting the token

1

Choose Discord as the platform

In the Platform dropdown, select Discord. (It starts on Telegram, so make sure you switch it to Discord.)

2

Paste your token

Click the Bot token box (it shows the placeholder "Paste your bot token") and paste the token you copied in Step 3. It appears hidden, like a password, which is expected.

3

Click Connect

Click the Connect button. While it's working the button reads "Connecting…". Raileon checks the token with Discord and, when it succeeds, confirms which bot it connected (by its username) so you can be sure it's the right one. Your token is then stored encrypted and private to your workspace.

If Connect fails

If Raileon says the token is invalid or unauthorized, the most common cause is a copy/paste slip or an out-of-date token. Go back to Step 3, click Reset Token to generate a fresh one, copy it again, and re-paste it here. If instead you see a message that Discord couldn't be reached, wait a moment and try Connect again.

Step 7 — Pick a channel and add it

Once the bot is connected, Raileon looks at which channels it can serve.

1

Review the discovered channels

Under the heading Channels Discord can serve, Raileon lists the text channels your bot can see, with the server name shown beneath each one. While it's searching you'll see "Finding channels…".

If you instead see "No text channels found. Make sure your bot has been added to your server.", the bot hasn't joined a server with text channels yet — go back to Step 4, confirm the bot is in your server, then return to this page and try again. (Only standard text and announcement channels show up here — voice channels won't.)

2

Set the audience

Next to the channel you want, there's a small dropdown for who the channel is for. Leave it on Staff — the recommended option today. (You'll see a Customer (coming soon) option — you can select it and it will reply, but it's an early preview with fewer controls, so use Staff for now.)

3

Add the channel

Click the Add button next to that channel. It shows "Adding…" briefly, and then the channel moves into your list of connected channels.

4

Check your connected channels

Scroll down to Connected channels. Your new channel appears here, showing the platform and the channel (the channel may be listed as an ID number rather than its name) along with its audience. A green ACTIVE badge means it's switched on. You can repeat Step 7 to add more channels.

Pausing and resuming

Each connected channel has a Pause button. Pausing stops the assistant from replying in that channel without disconnecting anything — the badge changes to PAUSED. Click Resume to switch it back on.

Step 8 — Test it and learn how to trigger the bot

Your assistant is now live in the channel you added. Here's the important part: in a Discord server, the assistant doesn't reply to every message it sees. That's on purpose, so it doesn't interrupt normal conversation. It replies in two situations:

  • When you @mention it. In a server channel, type @ followed by your bot's name to tag it, then your question — for example, "@YourBot what are today's open tickets?". The assistant replies in that channel. (It only responds when it's actually mentioned.)
  • When you send it a direct message (DM). Click your bot in the member list, open a direct message, and send any question. It replies to every DM.

To test, try both:

1

Send a direct message

Find your bot in the member list, click it, and send a quick message like "Hello". You should get a reply.

2

Mention it in your channel

Go to the channel you added in Step 7, type @ and your bot's name to tag it, add a short question, and send it. You should get a reply in the channel.

Good to know

Long answers are automatically split into smaller messages to fit Discord's size limit, so a detailed reply may arrive as a couple of messages in a row.

If it doesn't respond

If your assistant stays silent, work through these in order:

  • Did you @mention it or DM it? In a server channel it only replies when tagged. A plain message it isn't mentioned in won't get a reply — that's expected.
  • Is the Message Content Intent on? This is the most common cause. Go back to Step 2 and confirm the Message Content Intent toggle is switched on and saved.
  • Is the channel active? Check Connected channels in your dashboard — if the badge says PAUSED, click Resume.
  • Is the bot really in the server? Confirm it appears in your server's member list (Step 4).

Still stuck? Reach the Raileon team and we'll help you get it running.

For the bigger picture of how channels work — including the difference between staff and customer channels — see Discord & Telegram bots and Setting up a bot. To learn how your token and data are protected, see Security and your data.