Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.37 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.37 KB

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