friendlyreminderbot
friendlyreminderbot copied to clipboard
refactor main to use YAML parser and test with personal twitter bot
👨💻 Changes proposed
factor main and load_env plus just print for now
We can't use tweepy.API, because the twitter bot account is only allowed to use twitter API v2, which is compatible with tweepy.Client(). Also the loadenv file needed to be refactored because it wasn't working. Also changed the logic in main.py to suit the new reminders.txt format. Also created an example .env-example file to show the shape of what the .env files needs to be, and added .env to .gitignore.
mentions #40
✔️ Check List (Check all the applicable boxes)
- [x] My code follows the code style of this project.
- [x] This PR does not contain plagiarized content.
- [x] The title of my pull request is a short description of the requested changes.
📄 Note to reviewers
We need a bearer-token to authenticate with the V2 Twitter API.
📷 Screenshots
With bearer token, I attempted to run this, and the error was: tweepy.errors.Forbidden: 403 Forbidden
I will refactor this using the Python yaml parser.
The bot does send tweets, with my personal bot credentials. See here: https://twitter.com/odes_erik_bot/status/1528828488878284800