Files
skull132 fdccbc0d87 Discord.dm and config update
Adds the send_to_discord() proc for transmitting messages onto the discord server vie the bot.
2016-01-23 16:47:14 +02:00

15 lines
467 B
Plaintext

/proc/send_to_discord(var/channel, var/message)
if (!config.use_discord_bot)
return
if (channel == "admin_channel")
channel = config.discord_admin_url
else if (channel == "cciaa_channel")
channel = config.discord_cciaa_url
if (!config.discord_mention_everyone && findtext(message, "@everyone"))
replacetextEx(message, "@everyone", "")
ext_python("discordbot_message.py", "[config.discord_login] [config.discord_password] [channel] [message]")
return