arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
681 stars 144 forks source link

Discord Web Hook Variables #1246

Closed Nytridr closed 1 year ago

Nytridr commented 1 year ago
# Notifications
# discordWebhookURL="https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}"
 notifyMsgShuttingDown="Shutting down"
 notifyMsgStarting="{instance}.{ark_SessionName} Starting"
 notifyMsgServerUp="{instance}.{ark_SessionName} Server is up /n cosmicknights.net:{instance}.{ark_port}"
 notifyMsgStoppedListening="Server has stopped listening - restarting"
 notifyMsgServerTerminated="Server exited - restarting"
 notifyTemplate="{instance.ark_SessionName}: {msg}"
 noNotifyWarning=true
 notifyCommand='echo "$msg" | mailx -s "Message from instance ${instance} on server ${HOSTNAME}" "email@domain.com"'

Wondering if you could add something like this to be able to pull info out of the instance files before it post on Discord. I have changed some of the stuff in the notify stuff.. so hopefully you can follow along with what I am trying to do.

klightspeed commented 1 year ago

If you want to include ${ark_SessionName} in your notification templates, you should be able to set notifyvar_SessionName="${ark_SessionName}" in the instance file, then use {SessionName} in the notify templates.