Detects new cards uploaded to scryfall.com and sends e-mail and Discord updates.
The .github/workflows/main-runner.yml
file in this repo sets up a
GitHub Action to be run every so often.
When this job runs, it performs the following steps:
Sometimes cards are spoiled with non-English images. When this happens, Scryfall will take one of two approaches.
In either case, the card's name and text, including reminder text, will usually be an unofficial translation. Fortunately, these unofficial translations are usually pretty good.
If the card name changes between the initial upload and the official release, MTG Spoiler Notifier will re-send that card since it has a new name. MTG Spoiler Notifier will not know it's the same card because it has a new name.
I created a dedicated Gmail account to send e-mails. I personally saved the account password privately. This repo accesses the account via an "app password," which is set up in the Google account. The password is saved in the repo as a secret that can be accessed in the GitHub CI via an environment variable. The account is not linked to my personal information. If a malicious actor takes control of the account, I am not liable or responsible, and I have no way to reclaim the account. Any users of this application shall understand the risks associated.
The account name is mtgspoilernotifier@gmail.com
.
To get updates in Discord, a Discord webhook needs to be set up for a channel. mtg-spoiler-notifier will POST to the webhook to send a message in that Discord channel. The webhooks are stored as secrets in this repo.
In order to send messages with custom emoji on Discord, the full emoji IDs need
to be used. Check src/discordData.ts
for examples. These IDs can be obtained
by sending a message like \:emojiName:
in Discord.
To get added to the list, you can submit a pull request that adds your e-mail address to the recipients list. If you don't know how to do that, you can send me a message and I will teach you how :)
NOTE: the list uses ***AT***
instead of @
to make the addresses less
scrapable.
If you want your Discord channel to be subscribed, please let me know. The current setup requires me to manually add Discord channels.
If you come across any kind of issue, please submit an issue on GitHub about it. If you don't know how to do that, you can send me a message and I will show you how :)