Skip to content

BluePigman/BluePagmanBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

599 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BluePagmanBot

A Twitch chatbot running in Python.

Major Features:

  • Interact with Google Gemini to ask it questions, generate images, describe image and video links, and summarize Youtube videos.
  • Generate Braille/ASCII art from emotes/image links.
  • Get a random news headline from Google News.
  • Play various games: Gambling with points, Guess the Emote
  • Show lyrics of a song from Genius.
  • Fetch a random post or comment from a subreddit on Reddit.
  • Play a chess game through sending messages, with a dynamically updated PGN of the ongoing game.
  • Get a random chess opening name, can add specific keywords, and/or indicate the side.

Prerequisites

How to use:

  1. Fork or clone this repository.
  2. Create a virtual environment for Python, recommended uv
  3. Get an OAuth token of the Twitch account for the bot. I used this to generate one, but the site has now shut down, so please find another way to get one. You can get the access token and Client ID here
  4. Rename config_example.py to config.py, and fill in the details.
  5. Set up a Mongo database, add a database named "test" and a collection named "Users". Then add the connection string into config.py in db_uri.
  6. Run bot.py. The bot will now join the channels you put in config.py.

Maintenance (uv):

uv add to add packages. uv sync to sync packages with the project dependencies.

Video Demo:

Screen.Recording.2024-06-30.170209.mp4

Screenshots:

Credits:

This bot takes a lot of functionality from https://github.com/VJ-Duardo/VJBotardo

https://github.com/VJ-Duardo/PyBrailleArt for Braille Art

https://github.com/SSujitX/google-news-url-decoder to decode Google News URLs

And everyone else that helped me with testing by using the bot, thank you!