Skip to content

Uses the Tweepy module along with the Twitter API to post inclement weather day notifications to a popular gaming chat platform known as Discord. This uses Webhooks and a filter system.

Notifications You must be signed in to change notification settings

shubhamshah02/YRDSB-Inclement-Weather-Days

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

YRDSB Inclement Weather Days

This bot runs a constant stream of the @YRDSB Twitter page using the Twitter API and the Tweepy module and uses Discord Webhooks to post on a server. This project is fully open sourced.

Getting Started

This bot will need to run 24/7 on a system with Python 3 or higher. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them.

You will need to apply for a Twitter Developers API key to get the Consumer Key, Consumer Secret, Access Token and the Access Token Secret. You can do that here.

Tweepy - For accessing Twitter API (pip install tweepy)
JSON - For reading API responses (default)
dhooks - For forwarding content via Embed to Discord (pip install dhooks)

Installing

A step by step series of examples that tell you how to get this bot running on your system.

Open the yrdsbbot.py file and fill the empty variables with your Twitter Developer authentications.

Image of yrdsbbot.py

Open Discord and choose a channel where you want these messages to be posted. Click settings and create a new Webhook. Name the webhook, give it a profile picture and copy the URL and add it to the webhooks list on yrdsbbot.py.

Discord Webhooks

Get the Twitter User ID of the user you want to track. In this case, YRDSB's Twitter ID is 593188821. To find this User ID, click here

Find Twitter User ID

Deployment

Save all changes and run the bot via a command-line program on your operating system. (For example, py yrdsbbot.py and the bot should print Discord Webhook Bot is online! when its ready)

Built With

  • Twitter - Popular Social Media Platform
  • Tweepy - Python module to access the Twitter API
  • dhooks - Used to send embed data to Discord via Webhooks

Authors

Acknowledgments

  • Hat tip to anyone whose code was used. Thx <3
  • Inspiration (There's nothing like this available and the YRDSB website needs an upgrade)

About

Uses the Tweepy module along with the Twitter API to post inclement weather day notifications to a popular gaming chat platform known as Discord. This uses Webhooks and a filter system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages