A Discord bot for connecting OpenTTD and Discord
This bot is currently very early, expect missing features & things to not work
This is a self hosted bot that connects a discord channel to an OpenTTD server via the Admin Port and passes chat messages between the two. It also gives status updates to the discord channel (e.g. player joins, new companies, etc.). It also allows admins some server management.
- Connect to Discord and OpenTTD servers and pass chat between
- Provide basic game & server info via commands
node.js & npm
- Download latest version here
- Run
npm install
-
As this bot is self hosted you will need to create your own Discord App/Bot, you can follow this guide
-
Once you have your bot token, you can set up a config file. A commented example config is included in the config directory. Copy
config.example.yml
toconfig.yml
and copy your bot token. You can also set another bot prefix and permission levels. If you know channel ids, you can manually add these now, alternatively you can use the bot commands to set these up, and edit them.
- Run the bot with
node index.js
- On first run (no servers) the bot will output an invite link to the log & console. Follow this link to invite the bot to a server.
- Once the bot is added to your server, you can use the
!newserver
command to create a new OpenTTD server mapping. Optionally you can pass a name, ip and port. - Once you have ran this on the channels you want OpenTTD relays on, run
!save
to save the new config. - Shut down the bot, and edit the
config.yml
file to add the OpenTTD server's admin password. - Restart the bot and everything should be working.
- discord.js - Discord API node.js module
- node-openttd-admin - OpenTTD admin port node.js module
- @kenjie20 - Idea & Initial work
See also the list of contributors who participated in this project.