mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-07-19 11:42:21 +01:00
Discord.dm and config update
Adds the send_to_discord() proc for transmitting messages onto the discord server vie the bot.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/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
|
||||
Reference in New Issue
Block a user