View Single Post
Author Message
genuine
Junior Member
Join Date: Nov 2019
Old 10-18-2021 , 16:18   [DISCORD] Command To Server
Reply With Quote #1

Description:

Now sending commands to server from discord chat is real!

First of all we need to create bot here. Give needed perms and then invite it. to server.

Then create 2 text channels in discord:

1. For sending commands
2. To read output of commands

Later we will take ID of these channels and paste in config.

Important:

- in channel for sending commands, every message will be sent to server as command, so better hide channel from others
- unfortunately, not every output will be available in discord because of buffer limit
- don't even think to make same channel for sending commands and outputs

After loading plugin, if bot will send message to discord as "READY FOR COMMANDS", then we are ready to go.

Some screenshots:



If you get problems on installing, write it on comments and maybe i will make a wiki later.

ConVars:

HTML Code:
"sm_cts_bot_token - Bot token
"sm_cts_command_channel_id - Channel id to write commands
"sm_cts_output_channel - Channel id where bot will send output of commands
"sm_cts_server_id" - ID of your Server

There is a config file in cfg/sourcemod/command_to_server.cfg
Requirements:

Rest In Pawn 1.3
Discord API


Download:
GitHub Release
Source
__________________

Last edited by genuine; 10-18-2021 at 16:24.
genuine is offline