This release is a pre-release and may not be stable for production use.
twitch_bot
Section 1: Initial Setup
This is to set up all of the codes the bot needs.
- Download python: https://www.python.org/downloads/release/python-31011/
- Clone/Download this code
- Hit "Windows key" + "Q" -> "Command Prompt"
- Change directory to where you downloaded the code
- Type the following into the "Command Prompt" window:
pip install -r requirements.txt
Section 2: Setting up Twitch Settings
We need to make an "application" for the bot to act as, and you'll allowing the bot to act on your behalf.
- Go to: https://dev.twitch.tv/console
- Click on "Register your Application"
- Create a name. Note this down
- OAuth Redirect URL: type
http://localhost:3000. If it won't let you, set it tohttp://localhost. - Category: Chat Bot
- Client Type: Confidential
- Create
- In the next screen, click on "Manage" in the new row that's been created
- If step 4 didn't work, change the OAuth Redirect URL now.
- Copy the "Client ID". Copy this somewhere.
- Click on the "New Secret" button. Copy this somewhere AND DO NOT SHARE IT.
Section 3: Configure the chatbot
We are going to populate the information the bot needs to talk Twitch now in the env.cfg file.
- Line 2 - WIN_CRED_KEY: After the "=" you put anything you want (no spaces). This is what name we'll store all the sensitive information in the Windows Credential Store.
- Line 3 - CLIENT_ID: After the "=", copy in the Client ID from step 9 in the last section.
- Line 5 - BOT_NICK: The username of the account the bot will act as
- Line 6 - CHANNELS: All of the channels you want this bot to participate in. Put each channel in a new line.
- Hit "Ctrl + Windows key" -> "Credential Manager"
- Hit the "Windows Credentials" tile
- Under "Generic Credentials" hit "Add a generic credential"
- Internet or network address, enter what you put in step 1 (everything after the "=" with no spaces)
- User name: The "Client ID" you wrote down
- Password: The "New Secret" you wrote down
Section 4: Start the chatbot
- Hit "Windows+ "Q" key -> "Command Prompt"
- Change directory to where you downloaded the code
- Type the following into the "Command Prompt" window:
python -m mountaineer_bot.bots.mod_bot -c env.cfg - An authorization page might come up. Check the permissions needed and authorize if ok.
- You should see "Running in channels: {channels you listed}", then "Starting bot..." and then "{your username} is online!". If you see these, congrats, the bot is ready to go! Otherwise, you might've gone down the Section 4 path.
- When you're finished, close the window you created in this section.
Commands
- !where: The bot will respond with "I'm here".
- !hello: The bot will say hi to whoever typed it
- !cd {duration in seconds}: Will start a countdown. If someone else types it then it will replace any existing countdowns
- !cd cancel: Will cancel a running countdown
Acknowledgement
I wrote this code from scratch. While I'll happy to share this code, please acknowledge my contribution by linking to twitch.tv/three_mountaineers
Metadata
Release files for mountaineer-bot 0.0.1.dev2024122801
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mountaineer_bot-0.0.1.dev2024122801-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for mountaineer_bot-0.0.1.dev2024122801-py2.py3-none-any.whl |
Release files / mountaineer_bot-0.0.1.dev2024122801-py2.py3-none-any.whl
| Download URL | mountaineer_bot-0.0.1.dev2024122801-py2.py3-none-any.whl |
|---|---|
| Size | 54.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ed4d612c906eacf45193c16745a55cc4bfc09f6b5a5a6131e99f695f56689562
|
|
BLAKE2b-256 checksum How to use checksums |
9049d831c739d1edbfc39acac374b1effa8bd70ee19826095305baa04e493de0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.1
|
Security for mountaineer-bot 0.0.1.dev2024122801
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.