Skip to content

Sirexer/SRB2DiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SRB2DiscordBot

Have a chat with SRB2 players on Discord!
If you use .exe file, you don't need python and modules for bot, but if you want use .py file you need download python 3+ and modules.
The script does not work on Linux, also not tested for SRB2Kart!
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 the bot is able to do:
  • translate the chat from the game in the 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 at closing the server;
  • Display server statistics (map, image (url), map number, number of emeralds, number of players, map time, server time, list of players and their statistics).
  • Display messages in the console with timecodes;
  • write log messages from the game and from Discord in the log file;
  • Returns the current map after server restart;
  • Save game logs in another folder (because of an auto restart, logs are not saved in the logs folder);
  • Execute commands such as: csay, kick, ban, map, exitlevel, restart in Discord;
  • Autorestart on the desired map or through the number of completed levels, changes parameters if this is configured in the autorestart.cfg;
  • Pause the server if there are no players on the server.

SRB2 command table

NameDescriptionPossible ValueDefault Value
dbot_joinquitNotifies in Discord if a player joins or leaves the game for any reason.CV_OnOffOn
dbot_autopausePauses the game if the server has no players.CV_OnOffOn
dbot_nospamchatPuts Calmdown on second for messages.CV_OnOffOff
dbot_messagedelayDelays messages and sends messages after two seconds.CV_OnOffOn

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.