This bot monitors the Magic: The Gathering news archive and sends notifications to a Discord channel when new articles are published.
- Install the required dependencies:
pip install -r requirements.txt-
Create a Discord webhook:
- Go to your Discord server
- Right-click on the channel where you want to receive notifications
- Select "Edit Channel"
- Go to "Integrations"
- Click "Create Webhook"
- Copy the webhook URL
-
Configure the bot:
- Copy
.env.exampleto.env - Replace
your_webhook_url_herewith your actual Discord webhook URL
- Copy
- Open Task Scheduler
- Create a new Basic Task
- Set the trigger to run every 5 minutes
- Set the action to "Start a program"
- Set the program to
pythonand add arguments as the full path to your script - Complete the wizard
Add this line to your crontab:
*/5 * * * * /usr/bin/python3 /path/to/mtg_article_bot.pyThe bot will:
- Check for new articles when triggered
- Send a notification to your Discord channel when a new article is found
- Store the last seen article to avoid duplicate notifications
- Monitors the Magic: The Gathering news archive
- Sends formatted Discord embeds with article titles and links
- Prevents duplicate notifications
- Error handling and logging
- Cron job compatible