Comment on page
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.Download the release from the latest e-mail you received;
- 1.Go to the Discord Developer Portal and create a new Application (if you have already, skip this step);
- 2.Click in the
OAuth2
tab, copy and save theClient ID
and theClient Secret
(if you don't have the button, reset it); - 3.Add a new Redirect using the URL that you saved in WHMCS - Step 3 (skip this step if you haven't set up the WHMCS side yet);
- 4.Click in the
Bot
tab, create the Bot if you don't have and save theToken
(if you don't have the copy button, reset it). For security reasons, ensure thatPublic Bot
is off; - 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.
cPanel
Pterodactyl
Self Hosted (SSH)
This is the best solution to use if you use cPanel on Shared Web Hosting.
- 1.Open your cPanel, search for
Setup Node.js App
and open it; - 2.Click on New Application, Setup like below (you can choose any domain) and Create;
- 3.Upload the
BACKEND
folder to/AndrezzzLinkDiscord
(normally, when you open FTP/File Manager, it opens thepublic_html
folder, you need to go back); - 4.Edit the
config.json
file, with the information you gathered before in the Discord Installation and change theport
to3000
; - 5.Go back to the Application that you just created, refresh the page and click on
Run NPM Install
; - 6.Click on
Restart
and then test it, by clicking theOpen
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 can't allow IPs to make connections to the outside (Allow specific IPs for Outgoing Traffic, in some ports), please try one of the following ports and for more information, please check the FAQ:
- 2082-2083;
- 2086-2087;
- 4081-4085;
- 8080-8088;
- 8888.
- 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 containsnodejs_16
in the name; - 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, thenUnarchive
); - 3.Edit the
config.json
file, with the information you gathered before in the Discord Installation and change theport
to the one you choose before; - 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.
If you don't have Node.js installed yet or if you already have, make sure you have, at least, v16.11.0. You can check this, by running in your Terminal:
node --version
If you can't allow IPs to make connections to the outside (Allow specific IPs for Outgoing Traffic, in some ports), please try one of the following ports and for more information, please check the FAQ:
- 2082-2083;
- 2086-2087;
- 4081-4085;
- 8080-8088;
- 8888.
- 1.Open your SSH Terminal and create a folder for the Bot, for example, you can use
/opt/AndrezzzLinkDiscord
; - 2.Upload the
BACKEND
folder to the one you've just created,/opt/AndrezzzLinkDiscord
(normally, when you open FTP, it opens the user folder, you need to go to the desired folder); - 3.Edit the
config.json
file, with the information you gathered before in the Discord Installation and change theport
to the one you wanna use (don't forget to open it in your Firewall, if any, to allow Inbound Connections); - 4.Edit the
AndrezzzLinkDiscord.service
file and don't forget to replace it with the folder, that you created in Step 1 (if you have a custom path for the Node.js executable, change it also); - 5.Move the last file you edited to the folder
/etc/systemd/system
, enable it and start the Service; - 6.Test it, by pasting at the Search Bar the IP of the Server with the Port you chose, 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.Upload the
modules
folder to your WHMCS root folder; - 2.Go to
Setup -> System Settings -> Addon Modules
and active the moduleAndrezzz - Link Discord
; - 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.Go to
Addons -> Andrezzz - Link Discord
and add to the table the desired roles for each type you want. 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.Go to
System Logs -> Module Log
and activate it, if you don't have it already and try to repeat the issue; - 2.If you find any error, similar to the one below, most likely it's a Firewall issue. Please check the FAQ;
- 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.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;
As a final step, if you don'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)
)
Currently, 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.
I'm not responsible for any kind of Ban/Warning that you can in Discord, by using any sort of Notifications. Using the Type Related, you have almost no chance to get it, but if you choose E-mail Redirect, since it has Personal Information about the Client itself (e.g. Name, Address or ID) can be seen as a Data Leakage.
Due to the EU Law, the GDPR, they're very cautious.
Currently, there are two types of places to show the current Link:
- Homepage Panel
- Secondary Sidebar
Adicional to this and after version 1.7, it's automatically added to the WHMCS Sign-in Integrations, so if the Client clicks in his name and chooses
Security Settings
, he'll see something like this page. My system works the same as before.

This option, commonly mistaken, asks if you wanna redirect the Client to your Client Area or to show the Linked Discord information. Also, this is essential, if you want the Client to choose, if he wants to receive Notifications in their DM or not, if you have this enabled.

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;
- Product Server: have at least, one active Product of the Product Server 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.
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.
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
, wherex
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
, wherex
, can be 0 or greater than 0, can be the issue before.
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 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 mine, 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
Matthew#2000 - Suggestions
Last modified 28d ago