What else do I need to send the message that I sent in my Discord channel to be sent in-game?
PHP Code:
#include <sourcemod>
#include <discord>
#pragma semicolon 1
#define BOT_TOKEN "mytoken"
DiscordBot gBot;
public void OnAllPluginsLoaded() {
gBot = new DiscordBot(BOT_TOKEN);
}
public void OnMessage(DiscordBot Bot, DiscordChannel Channel, DiscordMessage message) {
char sMessage[2048];
message.GetContent(sMessage, sizeof(sMessage));
char sAuthor[128];
message.GetAuthor().GetUsername(sAuthor, sizeof(sAuthor));
PrintToChatAll("[DISCORD] %s: %s", sAuthor, sMessage);
if(StrEqual(sMessage, "Ping", false)) {
gBot.SendMessage(Channel, "Pong!");
}
}