Two-directional chat bot connecting Discord and Factorio chats together, written in TypeScript using Node.js. Examples
This bot does not:
- Disable Achievements BY DEFAULT.
- Require mods to run.
The guide below and on the Wiki is made for Factorio servers on Linux. Windows guide might be added on a later date.
- A Discord bot
- A Factorio server with RCON enabled
- A Factorio server with Logging enabled
- Node.js V14 (V16 is recommended!)
Head over to Discord's developer page to create a new application
Open this URL and replace CLIENT_ID
in the URL with the Client ID
found on the application's General Information
page. This should now show your bot, select your server to invite the bot there.
Now, the bot should have joined the server, and is currently offline.
Head back to Discord's developer page, select the application again and head over to the Bot
page under the settings tab.
Create a bot by pressing "Add Bot" and copy the token to somewhere for a while. You will need this token later for the bot to connect to Discord.
Keep this token to yourself ONLY!
The Factorio server must have RCON and Logging enabled. Add the following parameters to the run script:
--rcon-port <port>
- Port to use for RCON.
--rcon-password <pass>
- Password for RCON.
--console-log <path-to-file>
- File to log the chat messages in.
Full example, with server parameters:
/opt/factorio/bin/64/factorio --start-server /opt/factorio/saves/map.zip --server-settings /opt/factorio/data/server-settings.json --rcon-port 8080 --rcon-password password --console-log /opt/factorio/Factorio-server.log
Clone or download the repository.
Navigate to the containing folder and run npm install
to install required packages.
Run git clone https://github.com/AGuyNamedJens/FactorioChatBot
in the folder in which to clone the repository to.
New changes can be fetched by running git pull
in the directory periodically.
To verify Git is installed, run git --version
in the terminal.
Grab the newest stable release FactorioChatBot.zip at the Releases.
Run the following command within the containing directory to install the required packages.
npm install
Please note that releases are not commonly distributed, so cloning and pulling the repo is recommended to keep up-to-date with changes.
Additional info, including configuration parameters, can be found on the wiki.