Discord bot for any Nitrado game server
Project description
Nitrado Discord bot
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 from https://www.python.org/downloads/ or via following command (only if it is missing or very old):
sudo add-apt-repository ppa:deadsnakes/ppa -y && sudo apt update && sudo apt install python3.12 -y && sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
- Install following packages (Ubuntu/Linux only):
sudo apt install libffi-dev libnacl-dev python3-dev -y
- Install Discord Python package:
pip install -U discord.py
- In case if you meet "externally-managed-environment" error under Python 3.11 version, then run following command:
# Ubuntu/Linux only.
sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
- Install this bot as Python package via pip:
pip install nidibot
- Or upgrade already installed bot:
pip install nidibot --upgrade
References used (click to show):
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 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:
{
"connection": {
"discord_bot_token": "your-discord-bot-token",
"nitrado_api_token": "your-nitrado-api-token"
},
"discord_admin_users": []
}
- 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
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
nidibot-1.0.4.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file nidibot-1.0.4.tar.gz
.
File metadata
- Download URL: nidibot-1.0.4.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5655cd2c16d3ef0cd43a68ce317aa50fad2718c5aca77c4d60c6c952be11b5d |
|
MD5 | d482d9043eec804ecf33c5dce1d82964 |
|
BLAKE2b-256 | 81eadcadf2309df3d3c54ee289e6ccbb64ddb83f33446ccb2846a0bd2fbb19e7 |
File details
Details for the file nidibot-1.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: nidibot-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4babfa92cc30caac6313658aec08dcfdd5f743fb8381715b60cfe1730b39b48a |
|
MD5 | 7dd63da9294e9d134ba399ce843a6fbe |
|
BLAKE2b-256 | d24e2426764ec8b6af15b57477b8530f1f6630ea245fd5455faef6cd1eeb527b |