discordNotify
Sends a message to Discord using a webhook URL. See discord.com for more details about Discord webhooks, including how to create them for your server.
Signatures
beacon.discordNotify(message, webhookUrl);
Parameters
message
The message to send. Markdown will be parsed into a styled message.
webhookUrl
The URL to deliver the message to. Discord will generate this URL for you. This URL must start with https://discord.com/api/webhooks/
.
Examples
Alert the Discord channel when a survivor dies to a wild dino.
const character = beacon.fetchCharacter(beacon.eventData.characterId);
beacon.discordNotify(`${character.name} was just eaten by a wild ${beacon.eventData.attacker.species}.`, 'https://discord.com/api/webhooks/thisIsNotActuallyAValidWebhook');