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:
{
"controller": {
"discord": {
"token": "your-discord-bot-token",
"privileged_users": []
}
},
"server_provider": [
{
"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.0.9.tar.gz
.
File metadata
- Download URL: nidibot-1.0.9.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 985be41edbcb3c65a174c134c5789de6a6baab1a01a1003565157092824ee7c6 |
|
MD5 | cf867a867aad96a5f693ff9f69d12ef2 |
|
BLAKE2b-256 | 2155760b2e1c1637de6bf57fc30d5eb52352525baee62a65359224971d30a4e6 |
File details
Details for the file nidibot-1.0.9-py2.py3-none-any.whl
.
File metadata
- Download URL: nidibot-1.0.9-py2.py3-none-any.whl
- Upload date:
- Size: 12.9 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 | 60c63db5e03693bae9380a5975e7e612ece6ff68413b6a79e9f4daeacf6f4f3d |
|
MD5 | 515f5542e798345e17b2f57b2a37815b |
|
BLAKE2b-256 | b57bf0b16ae09a62206cbc0bb948e118ae03175ca03fc19fbc17acb7f20e6d04 |