Skip to content

How to integrate Discord with your Project Zomboid server

Project Zomboid supports Discord integration with your server. This means that anything typed in /all chat will be visible in a Discord text channel and anything typed in that Discord text channel will be visible in Project Zomboid.

To enable Discord integration you will need to have admin rights in the Discord server you wish to integrate

Creating a Discord Bot

  1. Go to the Discord Developer Portal
  2. Click New Application
  3. Give your bot a name and click Create

  1. Navigate to the Bot menu
  2. Reset the bot token and then copy it. You will need this later on.

Setting up OAuth2

In order for our bot to be secure and have the correct permissions, we will have to enable OAuth2

  1. Navigate to the OAuth2 menu.
  2. Click Add Redirect
  3. You will be asked to provide one a URI for authentication to work. If you have a website you can provide a link to it that will redirect to a Discord invite for your bot. If you do not have a website you can use the link below as a template. Be sure to replace [CLIENT ID] with your Discord client ID.
[https://discordapp.com/oauth2/authorize?&client_id=[CLIENTID]&scope=bot](https://discordapp.com/oauth2/authorize?&client_id=\[CLIENTID\]&scope=bot)
  1. Save your changes after adding this link.
  2. Under Scopes , check bot

  1. Select your redirect URL from the drop down

  1. Under Bot Permissions check Administrator
  2. Copy the generated URL and paste it into your web browser.
  3. Invite your Discord bot to the Discord server you wish to have integrated with Project Zomboid.

Setting up Discord Integration on your Project Zomboid server

Now that we have set up a bot and invited it to our server, we can finally integrate it to our Project Zomboid server.

  1. Go to the AleForge Panel
  2. Navigate to ./cache/Server/dedicated.ini This may be a different name if you changed your save name from Startup
  3. Find DiscordToken= and enter the token you copied from Creating a Discord Bot
  4. Find DiscordChannelID= and enter the ID of the channel you wish the Project Zomboid messages to appear in. You can get the ID of a Discord channel by right clicking on it and selecting Copy Channel ID
  5. Restart your server to apply the changes

Leave DiscordChannel= empty as the bot will not work if it is set to a value