Discord bot for any Nitrado game server
Project description
nidibot
Description
nidibot is a simple to install and configure bot for controlling your game servers from any messaging platform. Any is a bit of exaggeration here, since only Discord is supported.
nidibot name was derived from Nitrado, Discord and bot - game server provider and messaging platform for which this bot was written originally.
Commands
nidibot supports following commands:
/status [OPTIONAL:name]
Provides extended information about game server status.
/start [OPTIONAL:name]
Starts server if it is offline, restarts server if it is online.
/stop [OPTIONAL:name]
Stops server if it is online.
/restart [OPTIONAL:name]
Restarts server if it is online, starts server if it is offline.
/backup [OPTIONAL:name]
Creates backup of games server files and uploads them to storage. Backed up files are stored in the working folder of bot under backup folder.
Each command supports optional argument name. It is a convenience argument in case you have multiple game servers connected to the bot at once. In case if no name is specified, the command is applied to the first game server in the list.
Quick start
Prerequisites
You need to have following before you proceed with the instructions:
- Virtual machine (VM) or server somewhere in the Internet.
- Discord account (register or login at https://discord.com/).
- Any Discord server where you have access.
- Nitrado account (register or login at https://server.nitrado.net/en-GB/).
- Any game server that runs on Nitrado to which you have access.
Installation
- Login to your VM or server via SSH.
- Install Python 3.x. Do this only if Python 3.x is missing or very old. You don't need to have latest Python version for this bot.
- Install this bot as Python package via pip:
pip install nidibot
- Or upgrade already installed bot:
pip install nidibot --upgrade
Configuration
- Login to your VM or server via SSH.
- Create new folder for storing bot files.
- Proceed to the folder.
- Call following command for initializing bot in this folder and create default configuration files:
# Ubuntu/Linux only.
python3 -c 'from nidibot.nidibot import Nidibot; Nidibot.initialize_folder()'
- Following files should appear.
- Open bot_configuration.json file in any text editor and modify required values to your own:
{
"bots": [
{
"type": "discord",
"token": "your-discord-bot-token",
"privileged_users": []
}
],
"server_providers": [
{
"type": "nitrado",
"token": "your-gameserver-api-token"
}
],
"storage": {
"type": "google-drive",
"token": "your-storage-token"
}
}
- Install nidibot service, so it will start automatically every system restart.
sudo cp nidibot.service /etc/systemd/system/nidibot.service && sudo systemctl daemon-reload && sudo systemctl enable nidibot.service
- Start newly installed service:
sudo systemctl start nidibot.service
- Check service status:
sudo systemctl status nidibot.service
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nidibot-1.1.1.tar.gz
.
File metadata
- Download URL: nidibot-1.1.1.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d25c9d766da8e3cf037d8ef75250f07ca500da2eaae20c8dedfbcc4dc908d533 |
|
MD5 | d6f76f62d2ca95d76ab6192b81ae801b |
|
BLAKE2b-256 | 6742d1b00372940b033640fbf076851b87bd51a3c02bd1748af100f1a351319b |
File details
Details for the file nidibot-1.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: nidibot-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f659de921d5dcbd49bce8b4234907b8d1a7accc1bbb95cf43972b453c0beb5 |
|
MD5 | 23ff38dc23105da2cbe997530183d51b |
|
BLAKE2b-256 | 58ed86729a0b96a65f89a85c0ed83b6c5d1305bf6411567841e3215408ed0c76 |