We have chosen to integrate the Discord bot Zombei to allow our customers to link their Project Zomboid servers to Discord. This guide will help you configure the bot so that it is fully functional on your server.
Step 1: Creating the Discord bot
-
Go to https://discord.com/developers/applications and click on the "New Application" button.
-
Choose a name for your application (the bot name can be changed later).
-
Accept the terms and click on "Create".
-
Go to the "OAuth2" -> "General" tab.
-
In the "Redirects" section, click on "Add Redirect".
-
You can put any URL in this field. In our case, we'll use "https://lydhosting.net".
- Go to the "Bot" tab and in the "Privileged Gateway Intents" category tick: Presence Intent, Server Members Intent, Message Content Intent.
-
Go to the "URL Generator" tab.
-
In the "Scopes" section, make sure you select "Bot".
-
Tick "Administrator" in the "Bot permissions" section.
-
Copy the link generated in the tab and open it in a new tab.
-
Make sure you associate the bot with the right Discord server.
-
The last important step is to go to the "Bot" tab and click on "Reset Token".
- An API token looking like "MTExNDQ5OTg3MjEwMzEzNzQ0Nw.GETQ_j.8PaCS-Yfg0fCCZryVvj2bLcG0Az10WlVzcp9LE" will be displayed. You will need to copy this token.
Minor note: The 'Bot' tab also lets you change the avatar and name of the bot displayed on Discord.
Step 2: Configure your server to run the bot
-
On the Lyd Hosting panel, go to the "Configuration Files" tab.
-
Click on the "Config Editor" button in "lyd_discordbot.cfg".
-
Tick the "Activation" box and copy the token you have just retrieved into "Discord Token".
-
The "Configuring Channel" category lets you choose which channel the notifications are sent to.
-
The public channel can be configured in "Notification channel", enter the name of the text channel or its ID (How do I find the ID of a channel?).
-
If you tick "Enable admin logs", remember to specify a channel that will be dedicated to sending notifications. (We advise you to mute the channel to avoid receiving audible notifications).
- Finally, you can choose the notifications that will be sent to your Discord in the "Notification Settings" category.
-
Save your changes and restart your server so that the bot can start.
-
Connect to your server and you'll receive a notification (in the public channel) when your character appears.