Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.79 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.79 KB

spotbot

Description

Spotbot is an application to convert HamAlert alerts from POTA or SOTA in to a message format that can be forwarded on to a Discord channel webhook.

HamAlert Configuration
image
Discord Message
image

The function uses a Table in an Azure Storage Account to store the messageId of the last message posted for each callsign. If that message was posted recently (as defined by LOOKBACK_SECONDS), it will update the message instead of posting a new one to reduce the chatter of the bot.

You can find a live, working version of this bot in the Cascadia Radio Discord server, in the #spots channel. Join us!

Config

The app expects four environment variables:

  • TARGET_URL - the webhook URL from the target Discord channel.
  • LOOKBACK_SECONDS - the number of seconds to look backwards for previous messages to update instead of posting a new one
  • TABLE_NAME - the name of the table in the Azure Storage Account where the last messageIds will be stored for each callsign
  • AzureWebJobsStorage - the full connection string to the Azure Storage Account
  • SECRET_ENDPOINT - the name of the endpoint, kept secret to prevent abuse / unwanted messages

Deploy Notes

  • Some basic tests run in tests.py on the creation of a new PR
  • To deploy, manually run deploy-docker.yml
    • This will deploy to the staging slot for testing.
    • The staging TARGET_URL points to my private Discord server
    • LOOKBACK_SECONDS is set to only 300 (instead of 7200) for easier testing.