StreamBot.py is a very simple discord bot, that notifies members in a specified channel when someone with a specific role is streaming on Twitch or YouTube.
The streamers on your server must have their streaming platform accounts linked to their Discord accounts!
-
Install Python (Click here).
-
Install Discord.py (Click here).
-
Download bot.py.
-
Create a discord application here.
-
On the application dashboard create a bot.
-
Open "bot.py" with a suitable editor or IDE, I'm personally using Atom.
-
Then go to the last line of the file and replace 'ENTER YOU TOKE HERE' with the bot's token from Discord's application dashboard.
-
Enable developer mode in Discord's settings.
-
Create a streaming role and copy the id of your streaming role by right clicking.
-
Insert the streaming role id at line 10. Replace 'YOUR_STREAMER_ROLE_ID' with your streaming role id.
-
Copy the id of your streaming announcements channel by right clicking.
-
Insert the streaming announcement channel id at line 11. Replace 'YOUR_STREAM_ANNOUNCEMENT_CHANNEL_ID' with your streaming announcements channel id.
-
Now save the file an you're good to go.
The bot can be started with the following command, please replace the leading slashes with the path to your "bot.py" file.
python3 path/to/your/directory/bot.py