mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-07-16 10:12:19 +01:00
fdccbc0d87
Adds the send_to_discord() proc for transmitting messages onto the discord server vie the bot.
15 lines
467 B
Plaintext
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
|