A Discord Bot for creating Watch2Gether rooms automatically, and adding videos to the the room through discord chat.
!w2 <optional Youtube link> Creates a room.
!q <link> or 🚀 reaction Adds a video to room.
!w2 c Shows the main room.
!w2 ls Shows a list of all available rooms.
!w2 set Changes the main room to the specified room.
- Create a .env file that looks like this:
and place it in the same directory as the dotfiles.
DISCORD_TOKEN={your Discord token} W2G_API={your Watch2gether API key} YT_API={your Youtube API key (optional)} - Go to https://discord.com/developers/applications to create a discord bot.
This bot will need these permissions:
- Send message
- Read Message History
- Add Reactions
- Go to https://w2g.tv/en/account/edit_user/ to get the Watch2Gether API key. (Requires an account).
Optional (Needed for fetching thumbnail images in the w2g queue):
Go to https://console.cloud.google.com/apis and make a "YouTube Data API v3" API key.
- Run
docker build -t w2bot:latest .to create the image for the bot. - Then run
docker run -d --name w2bot_container w2bot:latestto make and run the container.
The bot should now be running. To test it send "!w2" in a open text channel.