Link Discord

Would you ever imagine, if you could have your WHMCS Clients verified with a Discord account and give them, in real-time, roles inside your guild? Now you can! By an affordable price.
Fig. 1 - Link Discord
The name Discord and related names, marks, emblems and images are registered trademarks of their respective owners.


Fig. 2 - Homepage Panel
Fig. 3 - Homepage Panel (Linked)
Fig. 4 - Linkage Page
Fig. 5 - Admin side (Edit and Delete)


  1. 1.
    Download the release from the latest e-mail you received;


  1. 1.
    Go to the Discord Developer Portal and create a new Application (if you have already, skip this step);
  2. 2.
    Click in the OAuth2 tab, copy and save the Client ID and the Client Secret (if you don't have the button, reset it);
  3. 3.
    Add a new Redirect using the URL that you saved in WHMCS - Step 3 (skip this step if you didn't set up the WHMCS side yet);
  4. 4.
    Click in the Bot tab, create the Bot if you don't have and save the Token (if you don't have the copy button, reset it). For security reasons, ensure that Public Bot is off;
  5. 5.
    Add the Bot, by simply going to this URL and editing in the Search Bar the CLIENTID to yours. Select the desired Guild, click on Continue and Authorize (you need to do this for every Guild you wanna add). Don't change the permission code, so that it can work with other features.


This is the best solution to use if you use cPanel on Shared Web Hosting.
  1. 1.
    Open your cPanel, search for Setup Node.js App and open it;
  2. 2.
    Click on New Application, Setup like below (you can choose any domain) and Create;
  3. 3.
    Upload the BACKEND folder to /AndrezzzLinkDiscord (normally, when you open FTP/File Manager, it opens the public_html folder, you need to go back);
  4. 4.
    Edit the config.json file, with the information you gathered before in the Discord Installation and change the port to 3000;
  5. 5.
    Go back to the Application that you just created, refresh the page and click on Run NPM Install;
  6. 6.
    Click on Restart and then test it, by clicking the Open button, if it doesn't redirect to my Website, then some mistake, was made. Please, check every single step. If it's all working, you can copy the URL in the Search Bar and save it to WHMCS - Step 3.
If you use cPanel and you can't allow IPs to the outside (Allow specific IPs for Outgoing Traffic, in some ports), please try one of the following ports, for more information, please check the FAQ:
  • 2082-2083;
  • 2086-2087;
  • 4081-4085;
  • 8080-8088;
  • 8888.
  1. 1.
    Create a new Server, using the above ports, or if you manage the Hosting where the WHMCS is, you can choose any port. Choose the egg discord.js generic and at least the image that contains nodejs_16in the name;
  2. 2.
    Wait until the server is created and upload the files, using FTP or the File Manager (if you use the File Manager, please ZIP the BACKEND folder contents first, then Unarchive);
  3. 3.
    Edit the config.json file, with the information you gathered before in the Discord Installation and change the port to the one you choose before;
  4. 4.
    Start/Restart the Server and wait until you see the below logs. Test it, by clicking on the IP:Port on Address and pasting it at the Search Bar, if it doesn't redirect to my Website, then some mistake, was made. Please, check every single step. If it's all working, you can copy the URL in the Search Bar and save it to WHMCS - Step 3.


  1. 1.
    Upload the modules folder to your WHMCS root folder;
  2. 2.
    Go to Setup -> System Settings -> Addon Modules and active the module Andrezzz - Link Discord;
  3. 3.
    Go to the configuration of the Addon and fill up all the information required (copy the URL given in Discord OAuth2 Redirect and go to the Discord - Step 3). Please check the FAQ, if you have any questions;
  4. 4.
    Go to Addons -> Andrezzz - Link Discord and add to the table the desired roles for each type you wanna. Please check the FAQ, if you have any questions.
You're pretty to go. Have a good use of the module and thank you once again 😊!


For Commum Issues, kindly check the Frequent-Asked Questions (FAQ). if you don't find it, check the below options to troubleshoot it.


This is the easiest way to debug the module, inside the WHMCS.
  1. 1.
    Go to System Logs -> Module Log and activate it, if you don't have it already and try to repeat the issue;
  2. 2.
    If you find any error, similar to the one below, most likely it's a Firewall issue. Please check the FAQ;
  3. 3.
    If you find any error, similar to any below, most likely it's a Backend issue. Please check the FAQ. For the first case and for the second case;
  4. 4.
    If you find any error, similar to the one below, it's a Backend error. First check if the FAQ, have anything about it, if not, go to Backend Troubleshooting;


  1. 1.
    Edit the file config.json, change the Setting debug to true and restart the Bot;
  2. 2.
    Repeat the request/action and check the console. If you don't find anything similar in the FAQ, please report it to me at Report.


As a final step, if you didn't find the solution, please report it to me, with the maximum information, as possible. Please, copy the following template, edit and send it to me using one of my Contact.
System Information:
- PHP Version: 8.1
- WHMCS Version: 8.6.2
- Node.js Version: 16.16.0
Issue: The WHMCS doesn't assign the roles if have too many services.
Any relative information: The client has 1000 services.
Steps to reproduce:
1. Link the Discord;
2. Buy one more service.
Request: Array
[action] => add
[clientID] => 2
[discordID] => 1014159062302195792
[roles] => Array
[826466298555793408] => Array
[0] => 826466298555793412
[1] => 826466298555793415
Response: Array
[result] => error
[message] => Error while adding the user: Invalid role(s) provided (826466298555793415)

Frequent-Asked Questions (FAQ)


There are two types of Notifications:
  • Type Related: when a Hook is triggered, a personalised and translatable notification, will be sent, based on the e-mail client's preference. At the moment, currently supports InvoicePaid, InvoiceCreated, TicketOpen, TicketOpenAdmin, TicketAdminReply, TicketClose, CancellationRequest, AfterModuleSuspend and AfterModuleUnsuspend.
  • E-mail redirect: simply redirects every single e-mail to their Discord DM. This could break some ToS from Discord since you're sending to their DM personal information.
For any questions, you may have, you can contact me anytime, here.

Type of Roles

Currently, the module supports up to five types of attribution criteria. Check the below description:
  • Guest: have no active Service;
  • Client: have at least, one active Service;
  • Group: have specifically, the Client Group informed;
  • Product: have at least, one active Product of the one informed;
  • Product Group: have at least, one active Product of the Product Group informed.
If you don't have any Guilds in the dropdown, please check if you added the Bot to the desired Guild. Check the Discord - Step 5.

Invalid role(s) provided

If you get this error in the Backend API or in the Module Log, check if the Bot/the Bot role is upper than the role you wanna give.

Couldn't connect to server

If you find this, in your's Module Log, either you have a Connection Refused (Backend Firewall) issue, either you have a Firewall (WHMCS) issue. Check below:
  • If you see after 0 ms, can be a Connection Refused issue, check if you have a Firewall in the Backend and if yes, if you allowed the Port, you're using;
  • If you see after x ms, where x is a value greater than 0, can be a Firewall in the server, you're running the WHMCS. To solve this issue, you should contact your Hosting Provider and ask them to allow the Backend IP, to have an Outgoing connection. If they don't allow it, please use port 80 or 443;
  • If you see after x ms: Connection refused, where x, can be 0 or greater than 0, can be the issue before.

WHMCS keeps loading

If you find your WHMCS, loading more time than usually takes or keeps loading, it's due to the connection between WHMCS and the Backend. The Backend is giving a Timedout issue, to workaround this, please check:
  • If you're using the right URL or IP:Port combination;
  • If the config.json hasn't the wrong IP Address wrong or Port.


This module and all the features, couldn't be possible if I didn't have the help of wonderful people, who stayed by my side, all the progress and helped me in every step I made. Gave ideas, argued mines, and tested them at all costs.
Thank you again to all the buyers for your help and kindness ❤️!
pacman™#4344 - Idea of the project
Dylan#1234 - Bug help
xDizziex#0001 - Suggestions & Dutch Translation
༺j༻#3333 - Readme Docs
Metuant#5074 - Suggestions & Bug help
Pinkmare#1337 - Suggestions
jake-#9777 - Bug help
Maxou45400#6336 - Bug help
Silver.#2200 - Suggestions
MonkeyWhisper#0001 - Suggestions
Richard (TheShiper)#3163 - Docs Help & Suggestions
Don | Check my Bio!#1001 - Donation
RX#4609 - Bug help
Ciel#3836 - Discord ToS Help
Fulger#0492 - Bug help & Romanian Translation
Mika L.#0666 - German Translation
Last modified 2mo ago