A discord bot for monitoring twitch streams
Project description
twitch_monitor_discord_bot
This is a discord bot which will periodically check a list of twitch streamers, and post an announcement on a specific discord channel when a streamer goes live.
Install
Install for Python3 using pip:
python3 -m pip install twitch_monitor_discord_bot
Usage
Run twitch_monitor_discord_bot as a python module:
python3 -m twitch_monitor_discord_bot bot_config.json
Where bot_config.json is your configuration file. See the following section for details about creating a configuration file.
Configuration file
The configuration file must be a .json file of the following form:
{ "twitch_client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord_bot_api_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord_server_id": 123456789123456789, "discord_channel_name": "my-discord-channel", "poll_period_seconds": 60, "host_streamer": "my-twitch-streamer-name", "silent_when_host_streaming": true, "streamers_to_monitor": [ "mrsketi" ] "stream_start_messages": [ "{streamer_name} is now streaming! watch it here: {stream_url}" ] }
Description of fields
twitch_client_id: Enter your Twitch client ID here.
discord_bot_api_token: Enter the API token for your discord bot application here.
discord_server_id: Enter the server ID for the server you want the bot to connect to here.
discord_channel_name: Enter the name of the channel you want the bot to connect to here.
poll_period_seconds: Enter the desired delay (in seconds) between checking if all streamers are live here.
host_streamer: Enter the name of your own twitch channel here (optional).
silent_when_host_streaming: If true, no announcements about other streams will be made when host streamer is live.
streamers_to_monitor: Enter the list of streamer names to monitor here.
stream_start_messages: Multiple messages can be defined here to be used as announcements for streamers going live. Messages may contain the following format tokens:
{streamer_name}: will be replaced with the name of the streamer
{stream_url}: will be replaced with the stream URL on twitch.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file twitch_monitor_discord_bot-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: twitch_monitor_discord_bot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.24.0 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.9.0-11-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ae1d0632819ee94626addbb3c915f8b91ebf5fbeae8de3e79fa1d7cf1007ba9 |
|
MD5 | e66bc9ad3e82fd0ca921e1385063abbf |
|
BLAKE2b-256 | 2b39f2054ffbc5c9281235f04d1681c2cf13e8f868fcbe63b0b6b060d385447f |