Ficsit2Discord is a custom Discord bot that interacts with a dedicated Satisfactory game server. The bot allows server administrators to manage the server directly from Discord, including saving the game, restarting the server, and viewing server stats.
- Save Game: Saves the game and sends the save file to Discord.
- Restart Server: Safely restarts the Satisfactory server.
- Server State: Displays the current state of the server, including player count, average tick rate, and server health.
- Settings: Shows the current server settings.
- Python 3.8+
- A running Satisfactory game server
- Discord API credentials (Bot Token)
- Required Python libraries:
discord.py
python-dotenv
PyFactoryBridge
-
Clone the repository:
git clone https://github.com/your-username/ficit2discord.git cd ficit2discord
-
Create a virtual environment (highly recommended):
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.env
file in the root directory and define the following variables:DISCORD_TOKEN=your_discord_bot_token SF_IP=your_satisfactory_server_ip SF_PORT=your_satisfactory_server_port SF_TOKEN=your_satisfactory_server_token SF_SERVER_NAME=your_server_name
-
Bot Prefix: The bot responds to commands starting with
!sf
. You can modify the prefix by adjusting theprefix
in theSatisfactory
cog. -
Environment Variables: Ensure the
.env
file contains the correct details for your Discord bot and Satisfactory server. You can get the api token via the ingame server manager console:server.GenerateAPIToken
Command | Description |
---|---|
!sf save |
Saves the game and sends the save file to Discord. |
!sf restart |
Saves the game and restarts the server. |
!sf state |
Displays the current server status, including players, ticks, and health. |
!sf settings |
Shows the current settings of the Satisfactory server. |
-
To save the game and get the save file in Discord:
!sf save
-
To restart the server:
!sf restart
- bot.py: The main entry point for the bot. It initializes the bot, loads environment variables, and handles cog loading.
- cogs/satisfactory.py: Contains all the Satisfactory-related commands and functions, such as saving the game, restarting, and checking server status.
- files/savegames/: Directory where game save files are stored after download from the server.
- Fork the repository
- Create your feature branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m 'Add your feature'
- Push to the branch:
git push origin feature/your-feature
- Open a pull request
A special thanks to the maintainers of the libraries used in this project:
discord.py
: For enabling Discord bot functionality. Maintained by Rapptz.PyFactoryBridge
: For enabling smooth communication with the Satisfactory server. Maintained by Jayy001.
This project is licensed under the MIT License - see the LICENSE file for details.