🐧SRB2DiscordBot Linux🐧

🐧SRB2DiscordBot Linux🐧 1.0

Read the Submission Rules before posting otherwise the mod may be rejected if it doesn't comply with these rules. (Updated February 10, 2023)
  1. I'm aware of the current Submission Rules
Author does not approve the use of his content in other addons without his permission
  1. No
SRB2DiscordBot
srb2discordbot-linux
SRB2DiscordBot
Chat with SRB2 players on Discord! If you use the .exe file, you don't need Python and modules for the bot, but if you want to use the .py file, you need to download Python 3+ and modules. The script does not work on Linux and is not tested for SRB2Kart either.

Important
SRB2DiscordBot-Linux has 3 different versions/Flavors:

srb2discordbot_linux1.py - the most stable version.
srb2discordbot_linux_rc3.py - version with split windows only for operating systems with graphical interface and default gnome terminal (modified by me, nua didn't help me this time xd)
srb2discordbot_linux_rc4.py - RC4 version is the most stable one for non-graphical interface OS or linux VPS
rc3 and rc4 are considered canary versions,i.e. bug proof versions,on the other hand srb2discorbot_linux1 is the most stable version,feel free to modify this script,credits mainly to Nua for helping and contributing to the modification of this bot code and to Sirexer for creating this script mainly for windows,i have made some use of chatgpt to start modifying the code but everything was then modified to make it bug free.

SRB2DiscordBot
Chat with SRB2 players on Discord!
The script already works on Linux, it has not been tested for SRB2Kart and Ring Racers!

Python modules:
Discord 1.7.3;
Tkinter 0.1.0;
Colorama 0.4.6;
C data types 1.1.0;
Transliterate 1.10.2;
Regular Expression Engine 2.2.1;
JavaScript Object Notation 2.0.9.

What can the bot do?
  • Translate game chat in discord and let communicate outside the game;
  • Run the server with parameters, the parameters are specified in the .cfg file;
  • Restart the server with a fatal error or when closing the server;
  • Show server statistics (map, image (url), map number, number of emeralds, number of players, map time, server time, list of players and their statistics).
  • Display console messages with time codes;
  • write game and Discord log messages to the log file;
  • Return the current map after restarting the server;
  • Save game logs to another folder (due to an automatic restart, logs are not saved in the log folder)..;
  • Execute commands like: csay, kick, ban, map, exitlevel, restart in Discord;
  • Autorestart on the desired map or through the number of completed levels, change the parameters if this is configured in the autorestart.cfg;
  • Pauses the server if there are no players on it.
SRB2 command table
NameDescriptionPossible ValueDefault Value
dbot_joinquitNotifies in Discord if a player joins or leaves the game for any reason.CV_OnOff
On
dbot_autopausePauses the game if the server has no players.CV_OnOff
On
dbot_nospamchatPuts Calmdown on second for messages.CV_OnOffOff
dbot_messagedelayDelays messages and sends messages after two seconds.CV_OnOff
On

CFG files
  • autorestart.cfg - configures autorestart and when to change server parameters;
  • commandperms.cfg - configures command permissions;
  • config.cfg - it contains the token and other standard settings;
  • dontsavemap.cfg - ignores the return of levels on maps in the file the next time you start the server;
  • emotes.cfg - configures emoji for information channel;
  • serverparameters\parameters.cfg - parameters for the server, they will not change, unless you edit the file;
  • serverparameters\pcfg<X>.cfg - parameters for the server, if you have configured restart they will change.

    IMPORTANT:
    My script is updated from time to time on github,when one or another error is found,if you want to receive updates or bug fixes,you can consider either clone the repository and do git pull when needed or you can also modify it as long as we are credited both as Sirexer and Tsuko (me the creator of this post),thanks in advance for your interest.
Credits to the original code to @Sirexer
original code: Sirexer Github
code for linux: srb2discordbot linux github
Author
Tsuko_G98
Downloads
86
Views
319
First release
Last update
Rating
0.00 star(s) 0 ratings

More addons from Tsuko_G98

Share this addon

Top