A chatbot that queries multiple free APIs to tell jokes, fun facts, and link fun images for Twitch chatters to enjoy! It also saves links that other chatters paste into the chat to a self-hosted MongoDB database.
You need to have a Twitch account in order to type in a Twitch chat. Some channels require that you follow the channel and/or have a verified account to type in their chat. Login to Twitch and type a command in one of the channels the bot is connected to.
If you type a chatbot command in these channels' chatrooms, the bot will get triggered
- abdullahmorrison (my twitch channel, used for testing)
- erobb221
- Brittt
- zomballr (he requested that I add the bot to his channel)
!abdullahcommands
: displays the list of commands a user can type to trigger the chatbot!tellmeajoke
: Tells a random joke by making aGET
request to official-joke-api.appspot.com/random_joke!randomfact
: Tells a random fact by making aGET
request to uselessfacts.jsph.pl!compliment [user]
: Compliments [user] by making a query to the cheer-me-up npm package!insult [user]
: Insults [user] by making fetching a random insult from an internal list!riddle
: Tells a random riddle by making aGET
request to https://riddles-api.vercel.app/random!catfact
: Tells a random cat fact by making aGET
request to catfact.ninja!dogfact
: Tells a random cat fact by making aGET
request to dog-api.kinduff.com!catimage
: Links a random picture of a cat to the chat by making aGET
request to api.thecatapi.com!dogimage
: Links a random picture of a dog to the chat by making aGET
request to random.dog/woof.json!wouldyourather
: Tells a 'would you rather' question by making aGET
request to https://would-you-rather-api.abaanshanid.repl.co/!fortune
: Tells a fortune cookie like fortune my making aGET
request to https://fortune-cookie4.p.rapidapi.com/slack
!recipe
: Brittt usually cooks during her streams. This command gives her ideas on what she can cook by making aGET
request to themealdb.com to get a random recipe and pasting a TikTok-search URL to that recipe in chat so she can view the instructions on how to make it on TikTok (she loves finding recipes through TikTok).!whyisbritttnotlive
: Tells a random excuse about why Brittt is not streaming today by querying a JSON file in the codebase that contains a list of the many excuses she uses to explain why she is not streaming today.
#1 Context: I am typing bot commands into my channel.
#2 Context: Chatters are typing the !dn
command which triggers my bot @AbdullahMorrisonBot
to tell a "deez nuts" joke. The chatters are responding with the emote GotEEM to show that they are laughing.
#1 Example Commands | #2 Used in a Live Twitch Stream |
---|---|
Demo.mp4 |
dn-demo.mp4 |
![](https://private-user-images.githubusercontent.com/49528805/280097390-522c8658-de8b-42db-92b4-3bf726884774.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5OTAzMjgsIm5iZiI6MTcyNTk5MDAyOCwicGF0aCI6Ii80OTUyODgwNS8yODAwOTczOTAtNTIyYzg2NTgtZGU4Yi00MmRiLTkyYjQtM2JmNzI2ODg0Nzc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDE3NDAyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIyNjY2MjMxNDI5NjNiMDNhYjY1ODM5ZjU0YmNhMmYzZWQ0Y2YxZDJkYmRjMDZlYmFlOTM2NjMwN2Y4ZDQ2MzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yjYe2-FBgmLtZeFBn-Ij7D8JJ4EP6evcNVdTjD4vzPM)
![](https://private-user-images.githubusercontent.com/49528805/292557118-72666f6f-9d2d-49b7-bcf3-1764c8215f34.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5OTAzMjgsIm5iZiI6MTcyNTk5MDAyOCwicGF0aCI6Ii80OTUyODgwNS8yOTI1NTcxMTgtNzI2NjZmNmYtOWQyZC00OWI3LWJ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