Hello,
I need your help for Broadcast the SmartChatBot response.
Currently, it works, but I have a problem with the bot response on Discord. SmartChatBot's response appears before the player's message.
This is the code of my implementation.
//SmartChatBot
private void CanSmartAnswerMessage(BasePlayer player, string message, string answer)
{
/* string noBR = Regex.Replace(arg.FullString, @"<br>| ", "\n").Trim();
string noHTML = Regex.Replace(noBR, @"<(.|\n)*?>", "").Trim();
string NextTick; // Next Tick to be sure it's after player's message. */
_settings.Channels.Where(x => x.perms.Contains("msg_serverchat")).ToList().ForEach(ch =>
{
GetChannel(_client, ch.Channelid, chan =>
{
chan.CreateMessage(_client, Translate("RUST_OnServerChat", new Dictionary<string, string>
{
{ "servermessage", "```CSS\n[" + DateTime.Now.ToShortTimeString() + "] #BOT`````` " + answer + "```"}
}));
});
});
}
I have another request. I want to exclude the BR and HTML into the message of discord.
Here's what the answer looks like about Discord :
Can you help me solve this problem?
Thank you for Avanace.