Scrape FREE deals from r/gamedeals and post in Discord.
This bot scrapes r/GameDeals on Reddit every 15min to see if any FREE things have been posted. It checks the title using RegEx for the words FREE
or 100%
. If it finds those words it consders it a deal worth posting. It then checks the database (SQLite) to see if we've already saved this deal and, if not, saves it to the database.
The Discord Bot portion then queries the database for a list of all items that have not been posted, creates an embed, and posts all unannounced deals into the designated channel.
Clone the repo
git clone https://github.com/div0ky/gamedeals_bot.git
Create a config.py
file in the root folder with the following variables defined. Filling in your info where needed.
REDDIT_CLIENT_ID = ""
REDDIT_CLIENT_SECRET = ""
REDDIT_PASSWORD = ""
REDDIT_USER_AGENT = "gamedeals_bot v0.2"
REDDIT_USERNAME = ""
DISCORD_TOKEN = ""
DISCORD_CHANNEL_ID = ""
DISCORD_PREFIX = 'd.'
REDDIT_NUMBER_OF_DEALS = 100
DISCORD_BOT_NAME = 'GameDeals'
Navigate to the folder in CMD
or Terminal
and run docker-compose up -d --build
.
- Navigate to the root folder.
- Run
pip install -r requirements.txt
- Run
python gamedeals_bot.py
.
Keep a Changelog
div0ky - https://div0ky.com - me@div0ky.com
Distributed under the GNU GPLv3 License. See LICENSE
for more information.
- Fork it ( https://github.com/div0ky/gamedeals_bot/fork )
- Create your feature branch (
git checkout -b feature/foobar
) - Commit your changes (
git commit -Am 'Add some fooBar
) - Push to the branch (
git push origin feature/foobar
) - Create a new Pull Request