Chatterton
A Discord bot that tells jokes, provides Apex Legends player stats, Today In History facts, and jokes to your inbox whenever mentioned.
Install / Use
/learn @pointerish/ChattertonREADME
Chatterton
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.
Available Commands
!stats: Provides Apex Legends player stats.- Usage:
!stats PLATFORM NICKNAME. PLATFORM needs to be replaced by the platform. This can be eitherorigin,PSNorXBOX. NICKNAME is the name of the of player.
- Usage:
!tih: Short forToday 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.
Installation
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:
- Download/clone this repo to your local machine
- Execute
touch .envfrom the projects root directory - Go to Discord's Developer Portal to create a new App and click on the
New Applicationpurple button <p align="center"><img src="./assets/appcreate.png"></p> - Give it a name once created click on
Boton the left column <p align="center"><img src="./assets/botbutton.png"></p> - Now click on the Copy button <p align="center"><img src="./assets/tokenbutton.png"></p>
- On your
.envfile add your token like this- DISCORD_TOKEN=PLACE_TOKEN_HERE
- To get the Apex Legends Tracker API go here:
- Apex Tracker API. You need to create an account and get an API Key.
- Put that key on your
.envfile as follows:- APEX_API=PLACE_API_KEY_HERE
- Run
bundle installfrom the project's root directory to install dependencies. - Run `bundle exec bin/chatterton.rb'
Inviting the bot to your server
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.
<b>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.</b>
Deployment to Heroku
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
<p align="center"><img src="./assets/newbutton.png"></p>Newbutton located on the top-right corner. -
Click on
Create new appand 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.
<b>Remember NOT to commit API credentials to public places.</b> The .gitignore file should handle that already but make sure you're not doing it.
- Set your API Credentials in Heroku as Environment Variables by clicking on the
Settingstab and then adding them to theConfig Varssection. - Go to the
Resourcestab on Heroku and click on the pencil icon to edit the Heroku Dyno. - Turn it on and click on Confirm. Once you do that everything should be ready.
Author
Josias Alvarado
- GitHub: @pointerish
- Twitter: @pointerish
- LinkedIn: Josias Alvarado
Built With
Contributing
Contributions and issues are welcome!
Show your support
Give a ⭐️ if you like this project!
License
This project is MIT licensed.
Acknowledgements
- Microverse
- The Apex Legends Tracker
- The Muffin Labs
- Ruby Community
Related Skills
node-connect
341.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.5kCommit, push, and open a PR
