Discord bot for streaming youtube videos. Works like theatre. Requires one "human" account for streaming video from PC to channel and bot account for controlling first one's browser.
Inspired by Mantra27
- Node.js with typescript
- discord.js v14 library for interacting with discord api
- puppeteer to control chrome
-
Use
git clone https://github.com/DEsimas/yt-stream-bot
to download source code -
Go to
yt-stream-bot
directory and create file called.env
-
Put there bot settings:
TOKEN = <discord bot token>
CHANNEL = <id of text channel with commands>
ROLE = <user role id>
VP_WIDTH = <monitor width in pixels>
VP_HEIGHT = <monitor height in pixels>
*TOKEN *CHANNEL, ROLE - turn on developer mode and copy id using right click menu
-
Install dependencies using
npm i
-
Start bot with
npm run start:dev
, crome browser will open -
Stream it using "human" account. Be careful this account can be blocked!
-
Use
!watch <video url>
command to play video.
TOKEN | token for discord bot |
---|---|
CHANNEL | id of text channel with commands |
ROLE | users with this role id can use bot, don't state for access from anybody |
VP_WIDTH | monitor width in pixels |
VP_HEIGHT | monitor height in pixels |