This project is a Discord bot that can post to a channel within a server to announce new deals for free games available for PlayStation Plus. The bot can also check the Nintendo eShop and PlayStation Store for deals on tracked games.
The project is currently being developed in the two branches as there is also a version that can be deployed to Heroku.
The application is built using JavaScript as the core language and discord.js for connecting with Discord services for basic bot functionality.
I decided to work on this project since I was looking to have a replacement for another bot that was forced through some changes because of Heroku. Rather than relying on compatability with the previous bot, which was more of an RSS bot, I started to work on this version to focus on my needs for deal tracking.
- Clone the repository
- Install Node
npm install
- Create user and database that is compatible with Sequelize
- Create
.env
using the example as a starting point node index.js
Weekly games given away by the Epic Games Store can be posted.
Monthly games given away for the PlayStation Plus membership can be posted using articles from the official PlayStation Blog.
Use a number based menu to view, add, and remove tracked games. Games currently on sale are denoated with the ON SALE
text.
Game sales will also be posted when they are first detected being on sale.
At the moment only titles from the PlayStation Store and the Nintendo eShop can be tracked. Price checks are set in the config using a string compatible with node-schedule.
Here is an explanation of the various config variables required for the bot to work:
configIcon
: Icon for various setting menusDATABASE_URL
: Heroku database URL (Only needed for a Heroku instance)dbDialect
: Database dialect (Read the documentation for Sequelize)dbName
: Database name (Only needed for a local database)dbUser
: Database user (Only needed for a local database)dbPass
: Database user password (Only needed for a local database)epicFreeURL
: URL that returns a JSON object with the Epic Games freebiesepicGameURL
: Base URL for an Epic Games product pageepicIcon
: Icon for an Epic Games postepicStoreURL
: Base URL that returns a JSON object of an Epic Games producteshopImageURL
: Base URL that returns a header image of a Nintendo producteshopIcon
: Icon for a Nintendo eShop posteshopURL
: Base URL that returns a JSON object of a Nintendo productprefix
: Prefix used for bot commandspsIcon
: Icon for a PlayStation Store postpsPlusIcon
: Icon for a PlayStation Plus postpsPlusURL
: RSS feed for the PlayStation Plus articlespsStoreURL
: Base URL that returns a JSON object of a PlayStation productscheduleEpic
: Schedule to search for the weekly freebies from Epic Games StoreschedulePsPlus
: Schedule to search for the announcement of monthly PS Plus gamesscheduleTracked
: Schedule to check all tracked games from its digital storefronttoken
: Discord bot token
- Epic Games Store: https://www.epicgames.com/store/
- Nintendo eShop: https://www.nintendo.com/games/buy-digital/
- PlayStation Store: https://store.playstation.com/
Images seen in the above demo screenshots are used only for demonstrational purposes and are not distributed in the source code. Any logos belong to their respective owners.
This software uses the following dependencies which are distributed under their respective licenses:
- discord.js - Apache-2.0 License
- dot-env - BSD-2-Clause
- node-fetch - MIT
- node-schedule - MIT
- pg - MIT
- rss-parser - MIT
- Sequelize - MIT