The txAdmin panel offers many features for your RedM server, including Discord bot integration. This guide will show you how to set up the Discord bot and how to use it.
To set up the Discord bot for your txAdmin server, first log into your txAdmin panel. You can find the login details on your server's overview page, as shown here:
This guide assumes txAdmin is already set up. For instructions, see our RedM: txAdmin Setup guide.
To connect the bot with txAdmin, you first need to create a Discord application. Your bot will be assigned to this application and operate under its name. To create an application, please visit the Discord Developer Portal.
Create a new application by clicking New Application and give it a name, as shown below:
Then create the application by clicking Create. For the next steps, please note the Application ID:
When you create the application, a bot is automatically created. You can get the token easily by clicking Reset Token. This will provide you with a user token, which you should also note down:
Never share the bot token to keep your bot running smoothly and avoid security risks. The token is like a secret key and must not be shared.
On the same page, scroll down and enable the "Server Members Intent" option, then save your changes:
To invite the bot, insert the previously noted Client ID into the following link at the appropriate place and open the link in your browser to add the bot to your Discord server. The link should look like this:
https://discordapp.com/oauth2/authorize?&client_id=1364549558197026816&scope=bot&permissions=18432
For the bot to work properly with txAdmin, you need the server ID where the bot should be active. You get this by right-clicking the server icon in Discord and selecting Copy Server ID. Note this ID as well.
Here is an example:
Optionally, you can also specify a channel where status updates like restart schedules will be posted. You can copy the channel ID the same way. Remember, the bot must have permission to read and send messages in this channel.
If you don't see the option to copy the server or channel ID, you need to enable Developer Mode in your Discord user settings first:
Now you can activate the Discord bot in txAdmin and enter all the previously noted IDs and tokens:
You can optionally send a one-time status message that continuously updates the current server status, player count, etc.
To do this, go to the desired Discord channel and enter /status add. Make sure the bot has permission to send messages in this channel.
This should generate a message like this:
You can customize everything in this message on the Discord settings page within txAdmin.
