ysdragon / streambot Goto Github PK
View Code? Open in Web Editor NEWA self bot to stream videos to Discord.
License: Other
A self bot to stream videos to Discord.
License: Other
Having the same issue that asd3344 previously reported, but unlike the previous issue, I am experiencing this on Linux rather than on Windows. Linux Mint specifically, on a Virtual Machine. Whether playing a movie or a youtube video, the bot will join the vc, start streaming (notably without loading any visuals or audio), and then immediately leave the VC.
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: SIGSTOP
at new NodeError (node:internal/errors:399:5)
at convertToValidSignal (node:internal/util:306:9)
at ChildProcess.kill (node:internal/child_process:488:5)
at proto.kill (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\node_modules\fluent-ffmpeg\lib\processor.js:656:23)
at Client. (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\dist\index.js:285:53)
at Client.emit (node:events:513:28)
at MessageCreateAction.handle (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\node_modules\discord.js-selfbot-v13\src\client\actions\MessageCreate.js:30:14)
at module.exports [as MESSAGE_CREATE] (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\node_modules\discord.js-selfbot-v13\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:366:31)
at WebSocketShard.onPacket (C:\Users\Administrator\OneDrive\Desktop\botsadmin\StreamBot-main\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketShard.js:499:22) {
code: 'ERR_UNKNOWN_SIGNAL'
}
Node.js v18.16.0
Whats the best host to buy for that thing that give best quality
node:fs:1509
const result = binding.readdir(
^
Error: ENOENT: no such file or directory, scandir '/movies'
at Object.readdirSync (node:fs:1509:26)
at Object. (/root/livev1/StreamBot/dist/index.js:18:33)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49 {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/movies'
}
i did make folder named movies
Somewhere in the video can be displayed the current time / duration of the video, and make commands to be able to start from the beginning and go to the desired time
Voice channels in discord has a 50 member limit. Does this bypass that limit to watch the stream and text chat?
Trying to mirror Facebook groups where we can easily get over 1000 viewers.
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: This project is unmaintained. See @discordjs/opus for an alternative.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\ffmpeg-static',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\ffmpeg-static'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\ffmpeg-static'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs\opus',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules@discordjs\opus'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs\opus'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules@discordjs\opus'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs\opus'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\ffmpeg-static'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\ffmpeg-static'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@dank074\discord-video-stream',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules@dank074\discord-video-stream\node_modules@discordjs\opus'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@dank074\discord-video-stream\node_modules\@discordjs\opus'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@dank074',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules@dank074\discord-video-stream\node_modules@discordjs\opus'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@dank074\discord-video-stream\node_modules\@discordjs\opus'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\discord-api-types',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\discord-api-types\payloads\v8'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\discord-api-types\payloads\v8'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs\formatters',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules@discordjs\formatters'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\@discordjs\formatters'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\node-opus
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.11 found at "C:\Users\asimv\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:401:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:430:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\asimv\Desktop\DiscordStreamVideoBot-main\node_modules\node-opus
npm ERR! gyp ERR! node -v v18.18.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: C:\Users\asimv\AppData\Local\npm-cache_logs\2023-10-08T19_43_19_633Z-debug-0.log
As stated, it would be amazing to add the ability to read into folders beyond the base folder
root@discordbotlive:~/StreamBot# npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @dank074/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/discord.js-selfbot-v13
npm ERR! discord.js-selfbot-v13@"^3.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer discord.js-selfbot-v13@"2.x" from @dank074/[email protected]
npm ERR! node_modules/@dank074/discord-video-stream
npm ERR! @dank074/discord-video-stream@"^3.0.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/discord.js-selfbot-v13
npm ERR! peer discord.js-selfbot-v13@"2.x" from @dank074/[email protected]
npm ERR! node_modules/@dank074/discord-video-stream
npm ERR! @dank074/discord-video-stream@"^3.0.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /root/.npm/_logs/2024-02-08T10_34_18_071Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-08T10_34_18_071Z-debug-0.log
$ bun run start
$ node ./dist/index.js
C:\Users\Will\Music\StreamBot\node_modules@discordjs\collection\dist\index.js:31
static {
^
SyntaxError: Unexpected token '{'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object. (C:\Users\Will\Music\StreamBot\node_modules\discord.js-selfbot-v13\src\rest\RESTManager.js:4:24)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
error: script "start" exited with code 1
Hi, would it be possible to have a containerized version for docker? I tried to do it but i have encountered problems with ffmpeg. Thanks!
Trying to figure this out, this seems to be the only bot that exists that can do this. Seeing multiple posts about how this isn't even possible, yet you have it here and there are people posting "bugs" etc.
Either way, I dont know shit about code etc. But I managed to get far enough to the point where I get 'INVALID_INTENTS', I see a few posts about it here and there but it just leads to more errors.
Using your example script, I get an output in the console like this. Is there a way to hide this?
28 902 video
3 1699 audio
13 1700 audio
38.66666666666424 903 video
17 1701 audio
20 1702 audio
33.33333333332848 904 video
5 1703 audio
14 1704 audio
19 1705 audio
41 905 video
13 1706 audio
19 1707 audio
39.66666666666424 906 video
18 1708 audio
14 1709 audio
41.33333333332848 907 video
Do I need a certified discord bot, or why do I get this error code?
#/home/bots/StreamBot/node_modules/.pnpm/[email protected]/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:244
throw new Error(WSCodes[error.code]);
^
Error [INVALID_INTENTS]: [Bot Token] Invalid intent provided for WebSocket intents.
at WebSocketManager.createShards (/home/bots/StreamBot/node_modules/.pnpm/[email protected]/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:244:15)
at async Client.login (/home/bots/StreamBot/node_modules/.pnpm/[email protected]/node_modules/discord.js-selfbot-v13/src/client/Client.js:266:7) {
[Symbol(code)]: 'INVALID_INTENTS'
}
Node.js v20.15.0
ELIFECYCLE Command failed with exit code 1.
**I am somewhat at a loss
does anyone have a tip? or better still the solution? :)
OT: i like your work :)**
there seems to be an issue with the syncing of audio and video when the bot is streaming a file from a local folder.
OS: Ubuntu 20.04.6 LTS
(a VM on proxmox)
Executing npm i
gives: nmp i.txt
executing npm run build
:
$ npm run build
> [email protected] build /data/sbot
> npx tsc
Unexpected token ?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npx tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sv/.npm/_logs/2023-11-22T02_36_21_994Z-debug.log
log file: 2023-11-22T02_36_21_994Z-debug.log
i have setup all ,,
but when i want watch any thing , youtube or any link or even movie in folder ..
self bot join ( Playing... ) and stream and ( Finished playing video. ) and leaving all that in a second ...
and no error in console ..
( os : windows )
any solutions ?
I have the bot all set up but when I try to run a command to play a local file or youtube video, the bot will join and then quicky leave.
The bot also appears to be creating .sock files??
If you could get back to me that would be great! You can directly contact me @SamzyDev on discord if you need to!
all the config I filled in and found my movie in the file, but when I tried to play it, the screen opened, but instead of the image and sound, there was only sound
Available movies:
Server is running on port 8080
/root/StreamBot/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSock etManager.js:244
throw new Error(WSCodes[error.code]);
^
Error [INVALID_INTENTS]: [Bot Token] Invalid intent provided for WebSocket inten ts.
at WebSocketManager.createShards (/root/StreamBot/node_modules/discord.js-se lfbot-v13/src/client/websocket/WebSocketManager.js:244:15)
at async Client.login (/root/StreamBot/node_modules/discord.js-selfbot-v13/s rc/client/Client.js:266:7) {
[Symbol(code)]: 'INVALID_INTENTS'
}
Node.js v18.19.0
Hello there, looking for some help and issues I got. Nothing too much I guess.
Added you in Discord, please add me when you got some free time.
When I run bun run build I get this error, I tried the same using npm in a docker container, eventually it errors out as well
$ bun x tsc
src/index.ts:49:42 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other.If this was intentional, convert the expression to 'unknown' first.
49 streamer.client.user.setActivity(status_idle() as ActivityOptions)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:78:47 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other.If this was intentional, convert the expression to 'unknown' first.
78 streamer.client.user?.setActivity(status_idle() as ActivityOptions)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:171:51 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
171 streamer.client.user?.setActivity(status_watch(moviename) as ActivityOptions)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:209:71 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
209 streamer.client.user?.setActivity(status_watch("") as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:222:71 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
222 streamer.client.user?.setActivity(status_watch("") as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:235:67 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
235 streamer.client.user?.setActivity(status_watch("") as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:241:63 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
241 streamer.client.user?.setActivity(status_watch("") as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:277:55 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
277 streamer.client.user?.setActivity(status_watch("") as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:511:39 - error TS2352: Conversion of type 'CustomStatus' to type 'ActivityOptions' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Property 'name' is missing in type 'CustomStatus' but required in type 'ActivityOptions'.
511 streamer.client.user?.setActivity(status_idle() as ActivityOptions);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/discord.js-selfbot-v13/typings/index.d.ts:4548:3
4548 name: string;
~~~~
'name' is declared here.
Found 9 errors in the same file, starting at: src/index.ts:49
can you make this compatible with syncler+ on android and with kodi connected to it on pc and also make this available movies and TV shows just link to imdb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.