Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Cant start the bot #42

Closed
ultra-beep opened this issue Jul 7, 2022 · 10 comments
Closed

Cant start the bot #42

ultra-beep opened this issue Jul 7, 2022 · 10 comments

Comments

@ultra-beep
Copy link

ultra-beep commented Jul 7, 2022

hey @Khanmanan @MojitoTea @ZeroDiscord @NotKaskus i would like to start up the bot but i get this error

[email protected] start
nodemon bot.js

[nodemon] 2.0.15
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node bot.js
C:\Users\proki\Downloads\automod-bot-main\node_modules\erela.js\dist\structures\Node.js:25
throw new TypeError('Node option "host" must be present and be a non-empty string.');
^

TypeError: Node option "host" must be present and be a non-empty string.
at check (C:\Users\proki\Downloads\automod-bot-main\node_modules\erela.js\dist\structures\Node.js:25:15)
at new Node (C:\Users\proki\Downloads\automod-bot-main\node_modules\erela.js\dist\structures\Node.js:68:9)
at new Manager (C:\Users\proki\Downloads\automod-bot-main\node_modules\erela.js\dist\structures\Manager.js:82:17)
at new MusicManager (C:\Users\proki\Downloads\automod-bot-main\src\structures\MusicManager.js:29:5)
at new BotClient (C:\Users\proki\Downloads\automod-bot-main\src\structures\BotClient.js:64:25)
at Object. (C:\Users\proki\Downloads\automod-bot-main\bot.js:11:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
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 Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
[nodemon] app crashed - waiting for file changes before starting...
could you help me

@HiVise
Copy link

HiVise commented Jul 13, 2022

Hey! I'm going to give a stab at this error you are having right now.

I am seeing the same error on my end and I am looking into it right now...

@HiVise
Copy link

HiVise commented Jul 13, 2022

Hello, This issue is fixed and no more errors for:
TypeError: Node option "host" must be present and be a non-empty string.

I did add a way for the bot to start without the host music array in the config being filled out.

I would like to note that music will not work without /automod-bot/config.json being fill out with the proper information.

This is what the Music tab should look like in /automod-bot/config.json

Fix:

Within the MusicManager.js file there was a line of code looking like this:
Line: 30 | nodes: MUSIC.NODES.HOST

I have changed that to look a little like this:
Line: 30 | nodes: MUSIC.NODES.HOST ? MUSIC.NODES.HOST : [],

I did also add a Logger if you don't have anything in there it should log that info to the console.

HiVise added a commit to HiVise/automod-bot that referenced this issue Jul 13, 2022
Note: This will allow for the bot to go online but will not allow the bot to play music and will give an embedded response to the message.author.
@ultra-beep
Copy link
Author

Thank you for this

@ultra-beep
Copy link
Author

btw could you tell me where you put the invite link perms because i found 1 place where you made it in the code and changed it but when i do /bot invite or /help ... it just keeps giving me the perms that you guys made into the link

@ultra-beep
Copy link
Author

and how do i make it so i can play music

@HiVise
Copy link

HiVise commented Jul 13, 2022

yea, If you want to play music on the bot please go to the Config.json file in the main directory and fill out the "Music" Array of data. Without this, it wouldn't be possible to play some music.

Music Config Array:
image

@ultra-beep
Copy link
Author

I filled it out but it says it doesnt have nodes

@ultra-beep
Copy link
Author

maybe i putted it wrong but what do you need to put with the host and identifier

@HiVise
Copy link

HiVise commented Jul 13, 2022

I believe that you need it all being:

host, password, and Identifier.

I only know so much about the bot because I just worked for 20 minutes yesterday to fix one bug.

@ultra-beep
Copy link
Author

ultra-beep commented Jul 13, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants