A Discord bot that tells jokes, provides Apex Legends player stats, Today In History facts, and jokes to your inbox whenever mentioned.
MIT License
A Discord bot that tells jokes, provides Apex Legends
player stats, tells random Today In History
facts and that sends you a joke through PM whenever mentioned.
Chatterton
is named after the poet Thomas Chatterton whose appearace has been gracefully disguised with ThugLife
glasses above.
!stats
: Provides Apex Legends player stats.
!stats PLATFORM NICKNAME
. PLATFORM needs to be replaced by the platform. This can be either origin
, PSN
or XBOX
. NICKNAME is the name of the of player.!tih
: Short for Today In History
. Gives you a historical fact for current date randomly selected from here.!joke
: Tells you a joke! This was implemented by consuming the JokeAPI.!commands
: Does what I just did: tells you what are the available commands.Chatterton
uses the dotenv
gem in order to access Environment Variables for the required API key and Discord Token.
Follow the next steps to configure all that's needed:
touch .env
from the projects root directoryNew Application
purple button
Bot
on the left column
.env
file add your token like this
.env
file as follows:
bundle install
from the project's root directory to install dependencies.Before actually using the bot on your server you need to invite it. The best step by step tutorial to do so can be found here.
Once you have invited the bot to your server you can start to use its commands.
Keep in mind that free API's often have a limit and the Apex Tracker is not the exception. Do not spam the !stats
command since the API will stop responding.
In order to deploy the bot to Heroku you need a free Heroku account and follow the next steps:
Go to your Heroku Dashboard and click on the New
button located on the top-right corner.
Click on Create new app
and then give it a name.
Select a Deployment Method. GitHub is the easiest one since you only need to provide your credentials. To deploy from GitHub you need to have a copy of the source code hosted there, so do that before selecting GitHub as deployment method.
Remember NOT to commit API credentials to public places. The .gitignore
file should handle that already but make sure you're not doing it.
Settings
tab and then adding them to the Config Vars
section.Resources
tab on Heroku and click on the pencil icon to edit the Heroku Dyno.Josias Alvarado
Contributions and issues are welcome!
Give a if you like this project!
This project is MIT licensed.