Skip to content

Posts message in discord channel if twitch streamer is online

License

Notifications You must be signed in to change notification settings

kthun91/ditwibot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General

ditwibot -> Discord-Twitch-Bot Self-hosting bot that posts messages in discord channel automatically. To start Bot on your server in background: nohup python ditwibot.py TWITCH_CHANNEL TWITCH_CHANNEL_ID TWITCH_CLIENT_ID TWITCH_SECRET DISCORD_WEBHOOK_ID DISCORD_WEBHOOK_TOKEN </dev/null &>/dev/null &

Requirement

You have to install Discord.py. I recommend using pip. For example: python3 -m pip install discord.py

ditwibot

Checks if twitch stream is online via Twitch API. Tokens available at https://dev.twitch.tv/console Discord Webhook and Tokens available at discord channel -> settings -> integration -> generate webhook Twitch user id available via userID.py python ditwibot.py TWITCH_CHANNEL TWITCH_CHANNEL_ID TWITCH_CLIENT_ID TWITCH_SECRET DISCORD_WEBHOOK_ID DISCORD_WEBHOOK_TOKEN

oauthToken.py

Generates the oauthToken or authentication token for Twitch from client ID and secret. IMPORTANT! Necessary for using the twtich API! You can find both by creating a twitch account and a new application at https://dev.twitch.tv/console

python oauthToken.py CLIENT_ID SECRET

userID.py

Generates the user Id of an existing Twitch channel. Necessary for some API calls.

python userID.py USERNAME CLIENT_ID OAUTH_TOKEN

Username can be extracted from channel URL.

Example: https://www.twitch.tv/github

github would be the USERNAME

About

Posts message in discord channel if twitch streamer is online

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages