Skip to main content

Discord bot for any Nitrado game server

Project description

nidibot

Supported Versions PyPi Versions Code style: black License

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:

  1. Virtual machine (VM) or server somewhere in the Internet.
  2. Discord account (register or login at https://discord.com/).
  3. Any Discord server where you have access.
  4. Nitrado account (register or login at https://server.nitrado.net/en-GB/).
  5. Any game server that runs on Nitrado to which you have access.

Installation

  1. Login to your VM or server via SSH.
  2. 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.
  3. Install this bot as Python package via pip:
pip install nidibot
  1. Or upgrade already installed bot:
pip install nidibot --upgrade

Configuration

  1. Login to your VM or server via SSH.
  2. Create new folder for storing bot files.
  3. Proceed to the folder.
  4. 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()'
  1. Following files should appear.
  2. 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"
    }
}
  1. 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
  1. Start newly installed service:
sudo systemctl start nidibot.service
  1. Check service status:
sudo systemctl status nidibot.service

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nidibot-1.0.9.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

nidibot-1.0.9-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2 Python 3

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

Hashes for nidibot-1.0.9.tar.gz
Algorithm Hash digest
SHA256 985be41edbcb3c65a174c134c5789de6a6baab1a01a1003565157092824ee7c6
MD5 cf867a867aad96a5f693ff9f69d12ef2
BLAKE2b-256 2155760b2e1c1637de6bf57fc30d5eb52352525baee62a65359224971d30a4e6

See more details on using hashes here.

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

Hashes for nidibot-1.0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 60c63db5e03693bae9380a5975e7e612ece6ff68413b6a79e9f4daeacf6f4f3d
MD5 515f5542e798345e17b2f57b2a37815b
BLAKE2b-256 b57bf0b16ae09a62206cbc0bb948e118ae03175ca03fc19fbc17acb7f20e6d04

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page