Blood bot
Configure first blood announcements to Discord and Telegram.
The blood bot posts an announcement to Discord or Telegram channels (or both) when teams land an early solve on a challenge.
Configuration#
bloodBot: bloodsCount: 3 destinations: - provider: name: messages/discord options: url: https://discord.com/api/webhooks/123456/abcdef - provider: name: messages/telegram options: botToken: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' chatId: '-1001234567890'bloodsCount set to 3 announces first, second, and third blood. Set it to 1 and only first blood gets announced.
Message providers#
Posts announcements through a Discord webhook.
To create a webhook, navigate to Server Settings > Integrations > Webhooks > New Webhook, then copy the webhook URL.
Posts announcements through a Telegram bot.
Custom message templates#
Each destination can have a custom messageTemplate:
bloodBot: bloodsCount: 1 destinations: - provider: name: messages/discord options: url: https://discord.com/api/webhooks/... messageTemplate: '{{teamName}} got {{bloodNumSentence}} blood on {{challengeCategory}}/{{challengeName}}!'Template variables#
Default templates#
When no custom template is set, the defaults kick in.
The Discord default is Congratulations to [`{{teamName}}`]({{teamUrl}}) for {{bloodNumSentence}} blood on `{{challengeCategory}}/{{challengeName}}`!.
The Telegram default is Congratulations to [*{{teamName}}*]({{teamUrl}}) for {{bloodNumSentence}} blood on `{{challengeCategory}}/{{challengeName}}`\!.
The Telegram template uses MarkdownV2 syntax and escapes the ! character, which the Telegram API requires.