Skip to content

Link your SRB2 server to your Discord server. Based off of Sirexer's SRB2 Discord Bot.

Notifications You must be signed in to change notification settings

mango-ki/SRB2DiscordBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SRB2DiscordBot

Have a chat with SRB2 players on Discord!

This is based off of Sirexer's SRB2 Discord Bot. You will need Python 3+ and the required modules for the bot.

The script does not work on Linux. This is 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:
  • Relay chat from the game into a Discord channel, and let Discord users communicate back in that channel;
  • 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.

About

Link your SRB2 server to your Discord server. Based off of Sirexer's SRB2 Discord Bot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.1%
  • Lua 14.9%