Rhythm-Bot
Rhythm-Bot copied to clipboard
Basic Installation Information Missing, Unable to Start rhythm-bot
Where are the contents from the zip file supposed to go? Do they go into a specific folder on your computer? I created a Rhythm-Bot-master folder inside my %username% folder and am trying to run npm start from there. All previous install steps appear to have completed successfully, but this is what I get when I run it:
c:\Users\Matt Zaharias\Rhythm-Bot-master>npm start
[email protected] start c:\Users\Matt Zaharias\Rhythm-Bot-master tsc && node dist/app
src/bot/bot.ts:98:33 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
98 done(); ~~~~~~
../AppData/Roaming/npm/node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34 33 new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; ~~~~~~~~~~~~~~~~~~~~~~~~~ An argument for 'value' was not provided.
src/bot/bot.ts:101:25 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
101 done(); ~~~~~~
../AppData/Roaming/npm/node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34 33 new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; ~~~~~~~~~~~~~~~~~~~~~~~~~ An argument for 'value' was not provided.
Found 2 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: tsc && node dist/app
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start 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! C:\Users\Matt Zaharias\AppData\Roaming\npm-cache_logs\2021-01-07T01_26_04_597Z-debug.log
The log information follows:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;c:\Users\Matt Zaharias\Rhythm-Bot-master\node_modules.bin;C:\Users\Matt Zaharias\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Python39\Scripts;C:\Python39;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Google\Google Apps Migration;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\OpenVPN\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PowerShell\7;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs;C:\Users\Matt Zaharias\AppData\Local\Microsoft\WindowsApps;C:\Users\Matt Zaharias\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: c:\Users\Matt Zaharias\Rhythm-Bot-master
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'tsc && node dist/app' ]
11 silly lifecycle [email protected]~start: Returned: code: 2 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: tsc && node dist/app
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.tsc && node dist/app
22 error Exit status 2
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Ah, I believe I resolved the issue. I had to install VS 2015 at one point, and I also had to edit the bot.ts to change the promise to type < void > (get rid of the spaces, if I don't include them between the symbols and the word void, Github drops the entire word as though it is interpreting my typing in-line as code that it should act on. I'm entirely new to this (Python + Node.js + Discord Bots + Github) , but notepad++ and some intense Googling last night and this morning led me to the resolution. I would also recommend instructions on what permissions to assign/allow and how to add the bot to your server via oauth2 and such, or at least listing those steps and where to take them.
More precisely, Line 92 in bot.ts: new Promise< void >(done => {
I specified < void > for the Promise and everything started running. Still can't !add any youtube/youtube music links, it seems, but I've got another thread/post going for that.
The promise issue should be resolved in the latest build among other issues.
Having to install VS is a curious part it shouldn't be needed, might be due to the build tools command I suppose.
Will have to set aside some time to update installation instructions at some point but that could be far off, this repo is more geared towards developers however.
To address the first part of the comments the files can go wherever but I'd recommend keeping it all contained within a folder which you can name what you like.