Package: nidibot
nidibotDescriptionnidibot is a simple to install and configure bot for controlling your game servers from any messaging platform.Anyis a bit of exaggeration here, since only Discord and Telegram is supported.nidibotname was derived fromNitrado,Discord andbot- game server provider and messaging platform for which this bot was written originally.FeaturesA minimalistic set of fundamental commands - everything you need to run and manage your game server.Possibility of connecting unlimited (somewhat) amount of game server providers and bots.High extensibility for game server providers and bots - just add a new class for missing game server provider or bot and make a PR.Easy setup - install ready-made nidibot package from PyPI and callinitialize_folder().Simple configuration - everything is located inbot_configuration.jsonfile in bot folder.LimitationsTelegram bot does not support automatic notification about game server status changes.There can be only one Telegram bot at the time. There is currently unresolved issue with running Telegram bot in thread.Commandsnidibot 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_create [OPTIONAL:name]Creates backup of games server files. Backed up files are stored in the working folder of bot underbackupfolder./backup_list [OPTIONAL:name]Lists available backups of specific game server.Each command supports optional argumentname. 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 startPrerequisitesYou need to have following before you proceed with the instructions:Virtual machine (VM) or server somewhere in the Internet.Discord account (register or login athttps://discord.com/).Any Discord server where you have access.Nitrado account (register or login athttps://server.nitrado.net/en-GB/).Any game server that runs on Nitrado to which you have access.InstallationLogin 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:pipinstallnidibotOr upgrade already installed bot:pipinstallnidibot--upgradeConfigurationLogin 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.Openbot_configuration.jsonfile in any text editor and modify required values to your own:{"general":{"backups_folder_path":"backups","logs_folder_path":"logs"},"bots":[{"type":"discord","token":"your-discord-bot-token","privileged_users":[]}],"server_providers":[{"type":"nitrado","token":"your-gameserver-api-token","timeout_seconds":10,"polling_seconds":5,"notifications":{"on_new_server":true,"on_status_change":true,"on_address_change":true,"on_version_change":true,"on_update_available_change":true}}]}Installnidibotservice, so it will start automatically every system restart.sudocpnidibot.service/etc/systemd/system/nidibot.service&&sudosystemctldaemon-reload&&sudosystemctlenablenidibot.serviceStart newly installed service:sudosystemctlstartnidibot.serviceCheck service status:sudosystemctlstatusnidibot.service