PorygonBot is a Twitch chat bot with a few automated responses and some simple chat commands.
- Automated Greetings: Greets chatters when they say hello or something similar.
- Lag Monitoring: Watches for "lag" mentions and alerts the streamer.
- Porygon Mentions: Replies to mentions of "Porygon".
- Message Garbling: Occasionally scrambles a message for fun.
- Periodic Chat Messages: Sends timed promotional messages from a JSON config file.
- Mini-games: Includes a
!shinyrollcommand to test your luck against standard shiny odds (1 in 8192).
!porygonbot: Prints a short bot intro.!lurk: Acknowledges that you are lurking.!socials: Shows the streamer's social links.!discord: Shows the Discord invite link.!shinyroll: Rolls a number from 1 to 8192.!bingo: Shows the current bingo link.!setbingo <link>: (Owner only) Update the bingo link.!reloadpromos: (Owner only) Reload the periodic message config file without restarting.
- Python 3.8+
- Twitch Developer Account to get Client ID and Client Secret.
- Clone the repository and navigate to the project directory.
- Install the required dependencies:
pip install -r requirements.txtCreate a .env file in the project root with your Twitch credentials:
TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secretNote: BOT_ID and OWNER_ID are set in porygon.py.
The bot reads periodic chat messages from promo_messages.json.
A typical entry looks like this:
{
"name": "socials",
"interval_minutes": 30,
"messages": [
"NOTICE: You can find all socials here: https://itsmejoji.com"
],
"randomize": false
}interval_minutescontrols how often the message is sent.messagescan be a single message or a list of messages.randomizepicks a random message from the list whentrue.
After editing the file, restart the bot or use !reloadpromos to reload it without restarting.
Run the bot with:
python porygon.pyThe bot stores tokens in a local tokens.db file.