Sourcemod Discord Chat Relay
Discord and cross server chat relay for sourcemod servers.
Requirements:
- Discord API
- Socket
- (for compilation)chatcolors include
Note: You'll need a discord app with bot. How to create
Installation:
- Put the
dcr-server.smx
/dcr-client.smx
in your serversaddons/sourcemod/plugins
directory. - For the
dcr-server.smx
, you have to copy thedcr.cfg
toaddons/sourcemod/configs
and replace<insert-bot-token>
with your bot token - Start the server once and modify the now created
cfg/sourcemod/discord-chat-relay-server.cfg
/cfg/sourcemod/discord-chat-relay-client.cfg
. To get the Channel id, enable Developer Mode in DiscordsApperance -> Andvanced
settings and right click the channel you want to get the id from. SelectCopy ID
to copy the ID. - Restart the server.
How it works:
One gameserver (with dcr-server) connects to discord and acts as 'server' for the gameservers to connect to. If you send a message from Discord, the 'server' gameserver will retrieve it and send it to all other connected gameservers. If you send a message from a 'client' gameserver, the 'server' gameserver will send it to discord and all other connected gameservers. And finally, if you send a message from the 'server' gameserver, it'll send the message to Discord and every connected gameserver.