Discord integration

Bot setup, several Discord servers per project, DM notifications for customers and staff, replying to a ticket from a DM, embeds, and account linking.

The Discord integration keeps customers and staff informed where they already are, on Discord, while the actual support conversation stays on the portal.

Bot setup

Connect your Discord server from Settings → Integrations. While no server is connected, the Discord card's Connect Discord button asks which bot will post in it and send your DMs. The same Discord server can be connected to multiple projects. Configuration requires the Configure Discord integration permission.

  • Joely's bot: invite it (Discord asks which server), and the server is connected when you come back to Joely.
  • A bot managed by Joely or your own bot (Team plan and above, see Bot identity): set it up first, then invite it. Discord asks which server, and Joely connects that server as soon as the bot joins it. Joely's bot never joins your server.
  • Your own bot is already on your server? Inviting it again does not tell Joely anything, so the card lists the servers your bot already sits in: pick yours. A server already connected to another Joely account is never listed.

This first server is your project's main server. To reach other servers too, see Several Discord servers. Once a main server is connected, inviting Joely's bot again from the Discord card (for example after it was kicked) always targets that server: Discord does not let you pick another one. To move the project to another main server, disconnect Discord first.

Bot identity

On the Team plan and above, the DMs your project sends can come from a bot with your own identity instead of Joely's, chosen when you connect your server (see above), or later from the gear at the top right of the Discord card:

  • Managed by Joely: Joely provides a bot and applies the name and avatar you choose.
  • Your own bot: paste the token of a bot from your own Discord application.

For a managed bot:

  • Choose a name, an avatar, or both. Nothing is set up until you pick at least one of them: until then your project keeps using Joely's bot.
  • The name is optional. Leave it empty, or clear it later, and the bot is named "Support", as shown in the name field. Like any rename, it counts toward Discord's limit below. Discord refuses a name that too many Discord accounts already use (a common word such as "test"): the setup is then refused with a request to choose another name, and nothing is changed.
  • The avatar is an optional image you upload: JPG, PNG or GIF (Discord does not accept WebP for a bot avatar), 5 MB max, applied when you save the form. A square image of at least 256×256 pixels works best. Without one, or after you remove it, the bot uses your project logo, or Joely's avatar if the project has no logo.
  • Discord limits renames. Discord only allows a bot to change its name 2 times per hour. A rename past that limit is refused with the time left to wait, and nothing is changed: neither the name nor the avatar. Changing only the avatar is not affected.
  • Reverting to Joely's bot gives the managed bot back to Joely. The bot leaves your connected server and your other servers first (if you invited it there), so it never shows up in your member list under another project's identity; deleting the project does the same. The bot keeps its name and avatar until the next project that uses it applies its own. Your name and avatar are not kept in your settings.

Use your own bot

  1. In the Discord Developer Portal, create an application.
  2. In General Information, leave Interactions Endpoint URL empty. When it is set, Discord sends clicks on buttons to that URL instead of to the bot, so the Reply buttons on its DMs would not respond. Joely checks this when you verify the token, and refuses the bot with the setting to fix. No privileged gateway intent (Presence, Server Members, Message Content) needs to be turned on.
  3. In the Bot tab, click Reset Token and copy the token.
  4. In Joely, open the gear of the Discord card, choose Your own bot, paste the token, verify it, then confirm. Joely encrypts the token before storing it.
  5. Invite your bot to your server.

Switch between a managed bot and your own bot

You can switch directly from one to the other from the ⋮ menu next to your bot (Switch to my own bot or Switch to a bot managed by Joely), without reverting to Joely's bot first:

  • From a managed bot to your own bot: once your own bot is connected, the managed bot is given back to Joely, exactly as when you revert to Joely's bot (it leaves your server first).
  • From your own bot to a managed bot: once the managed bot is set up, your own bot goes offline and Joely deletes its token.
  • Invite the new bot to your server. The previous bot's takeover of your server does not carry over: until the new bot is on the server with its permissions, Joely's bot is the one expected there, so the Discord card may show it as missing. Inviting the new bot is enough, it then takes over.

Invite your bot to your server

Discord only delivers a DM when the bot shares at least one server with the recipient. A managed bot or your own bot is not on your server when you set it up, so until you invite it there, Discord refuses most of its DMs.

  • Joely asks you to invite it right after you set it up: your own bot's invite page opens as soon as you connect it. Later, the Discord card's Invite the bot button gives the same link. It preselects your connected server (when one is connected) and asks for the same channel permissions as Joely's bot (view channels, send messages, embed links, manage webhooks, manage roles), so your bot can take over from Joely's bot (see below).
  • Joely checks it for you. Joely checks whether the active bot is on your connected server when you open the dashboard or switch to the project (an answer less than 10 minutes old is reused) and when you open the Discord settings. If the bot is kicked from your server or joins it while it is online, Joely picks it up right away, with no reload. If a check cannot run (the bot cannot be started, Discord does not answer), nothing is reported as missing.
  • You see it from anywhere in the dashboard. While the bot is missing from your server, an alert icon shows on the Settings menu entry, on the project in the project selector, and on the gear of the Discord card. The Settings entry then leads to the Discord card and its invite. These alerts are shown to members with the Configure Discord integration permission, and disappear once the bot is back on the server.
  • This covers the members of your server only. A customer who is not on your server still shares no server with the bot, and Discord refuses its DMs to them. Joely cannot check this in advance for a given customer, nor whether a customer's privacy settings accept DMs from your bot: when Discord refuses one, that notification is simply not delivered.

Your bot sends every DM tied to the project: ticket reply notifications (customers and staff), internal note and assignment notices, AI import notices, CSAT surveys, payment links, automation DMs, and the test DM sent when a customer links Discord on your portal. When a message is edited or deleted, its DMs are updated or removed by the bot that sent them. If that bot is no longer online (you switched bots, or removed yours), those DMs stay as they were.

A single bot on your server

This rule applies to your main server. As soon as you set up a managed bot or your own bot, it takes over from Joely's bot, which leaves your server right away: you never keep two bots there. Until your bot is on the server, nothing can post in your channels: the Discord card shows The bot is not on your server with Invite the bot, and Post on Discord is hidden. From then on, your bot makes the posts in your server's channels: custom embeds, CSAT ratings and automation channel posts.

  • Joely's bot stays while another project needs it. When the same server is connected to several of your projects, Joely's bot only leaves once none of them relies on it anymore.
  • Invite your bot with the permissions its link asks for. A bot on the server without them cannot post in your channels: open its invite link again and accept the permissions, Discord then updates them.
  • Replacing your own bot (with a managed bot, another bot of your own, or Joely's bot) makes it leave your server and your other servers too.
  • Disconnecting Discord (the Discord card's Disconnect) makes your bot leave your server too, and a managed bot goes back to Joely, like Joely's bot (which stays only while another project of yours uses the server). Deleting the project does the same.
  • Private channels open to Joely's bot through a channel-specific permission (for example a permission given to the Joely role) are not opened to your bot automatically. Give it the same access in the channel settings; until then, the embed sender shows those channels as not postable.
  • Switching back to Joely's bot (reverting to Joely's bot, or replacing your bot) makes Joely's bot the one that posts again. When it is no longer on your server, Joely asks you to invite it right after the revert, and the Discord card asks you to invite it, with an alert icon on the Settings menu entry and in the project selector, until it is back.

DMs with no project behind them, such as the test DM when a staff member connects Discord for notifications in their profile, always come from Joely's bot.

If the project owner's plan no longer includes this feature (downgrade, cancellation, failed payment, end of trial), Joely's bot takes over from the next notification and your bot goes offline within a few minutes: the buttons on the notifications it already sent stop responding, replying to them no longer reaches the ticket, and editing or deleting a ticket message no longer updates those DMs. New notifications come from Joely's bot and can be answered as usual. Your bot's settings (name, avatar, token) stay stored: when the plan includes the feature again, your bot comes back online on its own within a few minutes, or right away with the next notification, with nothing to reconfigure. You can also delete the saved bot from the same card. If your bot had taken over your server, the posts in your channels go back to Joely's bot too: since it left the server, the Discord card asks you to invite it, and an alert shows on the Settings menu entry.

Several Discord servers

A shop often has one Discord community per Tebex store, while its tickets stay in one project. Since Discord only delivers a DM when the bot shares a server with the recipient, a customer who is only on your second server gets no notification until the bot is there too. Add your other servers under Discord servers on the Discord card, which lists your main server first, with the Configure Discord integration permission.

  • Adding a server with Joely's bot: Add a server opens Discord's authorization, where you pick the server. You come back to Joely with the server added.
  • Adding a server with a managed bot or your own bot: open the invite link, pick the server in Discord, and the server is added as soon as the bot joins it (within 30 minutes of opening the window). The first server the bot joins in that time is the one added, so add it before sharing the link with anyone else. A server your bot already sits in can be added in one click from the same window.
  • The bot is your project's bot. Joely's bot, or your managed or own bot when your plan includes Bot identity. A server already connected to another Joely account is refused.
  • Each server shows its status: Bot connected, Missing permissions (the bot is there without the permissions channel posts need), Bot not on server (with an Invite the bot button), or Not checked yet. Joely checks again when you open the card (an answer less than 10 minutes old is reused) and picks up the bot leaving a server as it happens (and a managed or own bot joining one). A server with a missing bot or missing permissions raises the same alert icon as the main server, on the Settings menu entry and in the project selector.
  • Where you can post: custom embeds and automation Discord notifications let you pick the server, then the channel. CSAT ratings are always posted on the main server.
  • No takeover on other servers. The "single bot" rule above only applies to the main server: when you switch to a managed or own bot, Joely's bot does not leave your other servers on its own. Invite your new bot there (the status shows Bot not on server until you do) and remove Joely's bot from those servers yourself if you want a single bot.
  • Removing a server asks for confirmation and tells you how many automations post to it: they fail until you pick another server in them. Joely's bot leaves the server unless another of your projects still uses it. A managed bot leaves it too; your own bot stays on it.
  • Inviting Joely's bot back into a server (status Bot not on server or Missing permissions) only targets that server: Discord does not let you pick another one.
  • Removing the main server (project owner only, once another server is added): pick which of your other servers becomes the main one. Your bot settings stay. The Discord CSAT channel is reset, so pick it again on the new server. The confirmation tells you how many automations post to the main server: those that picked no server, or the former main one, fail until you pick their channel again; those already posting to the new main server keep working. The bots leave the former main server under the same rules as removing a server.
  • Disconnecting Discord removes your other servers too, along with the main one.

The number of servers per project depends on the owner's plan, the main server included: 1 on Free, 2 on Plus, 5 on Team, unlimited on Enterprise. After a downgrade, the most recently added servers beyond the new limit are locked: they stay listed, greyed, but are no longer offered as a destination, and automations posting to them fail until you upgrade or pick another server. The bot stays on them, so DMs still reach their members.

Customer DM notifications

When staff replies to a ticket, the customer receives a Discord DM with a preview of the reply and a link back to the ticket on the portal. A chat message posted by an automation counts as a staff reply. On a shared ticket with invited participants, a reply from one customer also DMs the other participants (the creator and invitees); the author is never notified of their own message.

A few rules worth knowing:

  • You can reply straight from the DM. Every notification carries a Reply button that opens a text box, and an Open ticket link. You can also use Discord's own reply feature on the notification; both post to the ticket that DM was about. Once a reply is sent, the button reads "Reply sent": to write again, use the next notification or the portal.
  • A message sent on its own is not routed. Without one of those two actions there is no way to tell which ticket you mean, so the bot answers with a short reminder of how to reply. That holds even if you only have one ticket open.
  • Files cannot be sent from Discord. Attach them to the ticket on the portal instead.
  • Attachment links open the file in the ticket. A reply with files lists them in the DM. Clicking one opens the ticket on the portal, scrolled to that message: an image opens in the image viewer, a code or text file in the read-only file viewer. For other files (PDF, archives…), the message is highlighted and the file is one click away from its download. You sign in first if needed, then land on the same file. The link only carries the file's identifier: opening it still requires access to the ticket. The same applies to staff notifications, on the dashboard.
  • Yes/No questions stay one click. The AI's "Are you talking about this script?" question ships with Yes/No buttons instead of a Reply button, so it can be answered in one click.
  • Account linking is required. The customer must link their Discord account first; after their first ticket, the portal shows a one-time prompt suggesting it.
  • Per-ticket follow. Customers can follow or unfollow individual tickets to control which ones DM them.
  • Privacy settings win. If a customer's Discord privacy settings block DMs from the bot, the notification is simply not delivered; it never blocks the ticket flow.

Staff DM notifications

Team members get Discord DMs too, as soon as they have connected a Discord account. They are on by default, and each member can adjust or turn them off in their own notification settings:

  • New messages: by default, a DM for every customer reply on a ticket they are assigned to. They can add replies from other staff members (which include an automation's chat messages), and widen it to every ticket they can access.
  • Internal notes: a DM when a teammate posts an internal note on one of those tickets.
  • Assignments: a DM when someone assigns them to a ticket.
  • Per project: DMs can be switched off for a single project while staying on for the others.

No DM is sent for a message you wrote yourself, nor for a new message while you are looking at that ticket (a ticket left open in a background tab does not count).

Who can reply from a DM

Both customers and staff can answer a ticket from its notification DM, with the Reply button or Discord's own reply feature. The DM itself is the ticket context, so a reply only works on a notification you personally received, and the same rules as the portal and the dashboard still apply at the moment you reply:

  • Customers must still be the ticket creator or an active participant. A reply to a closed ticket is refused and the bot says so; on every other status, including resolved, it is posted.
  • Staff must still be a member of the project with the Send messages permission. Like on the dashboard, no status blocks a staff reply.
  • Internal notes stay internal. On the DM of an internal note, the button reads "Reply as internal note" and the answer is posted as another internal note, which also requires Send internal notes. A customer reply is always public.
  • A reply sent from Discord is posted like one typed on the portal or the dashboard: everyone viewing the ticket sees it in real time and the usual notifications go out.
  • On the dashboard, a reply sent from Discord shows a Discord icon next to its time ("Sent from Discord" on hover). Customers do not see it on the portal.

CSAT surveys via DM

When a ticket reaches a survey-eligible status, the CSAT survey invitation can be delivered as a Discord DM with a direct, no-login link to the rating page.

Embeds

Staff with the Send portal embed to Discord channels permission can compose custom embed messages with a live preview and send them to any channel of the main server or of one of your other servers, typically to promote the support portal ("Need help? Open a ticket here"). With several servers, pick the server first: its channels and custom emojis follow.

Account linking

  • Customers link Discord on the portal as a DM delivery target only (not an identity link). The same Discord account can therefore receive notifications for several customer accounts, such as two separate CFX.re identities.
  • Staff sign in to the dashboard with Discord OAuth (one Discord identity per dashboard account) and can additionally connect a Discord account to receive notification DMs.