Jump to content

Discord.JS Help

Stentorian
Go to solution Solved by 0x21,

I'm not entirely sure what issue(s) you're having, but I have managed to get your code working.

 

Assuming you're in some directory with index.js and config.js:

sudo apt update
sudo apt install build-essential ffmpeg

npm init
npm i --save discord.js node-opus ffmpeg simple-youtube-api ytdl-core

# You might not have to do this.
cd node_modules/node-opus/
npm i -g node-gyp
node-gyp configure build

cd ../../
node index.js

 

 

I have a Music Discord Bot running OpusScript and for some reason whenever it joins a vc, it leaves straight away with nothing in the console error wise and an error cannot be seen from my view. Any ideas?

 

If you need anything else from me then feel free to ask! 

Current PC: 

Spoiler

Motherboard: MSI Z390-A PRO

CPU: Intel Core i7-9700K @ 3.60GHz

Memory: 32GB (4x8GB) Corsair Vengeance 

Graphics Card: NVIDIA GeForce RTX 3060 Ti

Boot: Crucial P2 500GB (M.2)

SSD: Crucial BX500 1TB

HDD: Seagate ST2000DM001 2TB

HDD: Seagate Barracuda 4TB

PSU: Gigabyte P750GM 750W

Case: IONZ KZ10

Current Laptop:

Spoiler

Name: Lenovo ThinkBook 14 20SL003JUK

CPU: Intel i7-1065G7 @ 3GHz

Graphics: Intel Iris Graphics

RAM: 16GB DDR4 @ 2667MHz

SSD: 480GB Western Digital M.2

Secondary SSD: 240GB Adata SATA

Other Gear:

Spoiler

Phone: Google Pixel 6 (128GB)

Headphones: Steelseries Arctis 3

Microphone: Blue Snowball Ice

Speakers: Creative T100

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/21/2018 at 5:10 PM, mshaugh said:

Please share your code.

Here is the main file: index.js

All the config has is a API Key, a default prefix for when I add a prefix system and the Token. 

On 11/21/2018 at 7:26 PM, Teddy07 said:

-snip-

There's no need to be rude. I didn't want to go randomly uploading a random file to the forum so I wanted to see whether someone could come up with the solution first without needing the code. 

Current PC: 

Spoiler

Motherboard: MSI Z390-A PRO

CPU: Intel Core i7-9700K @ 3.60GHz

Memory: 32GB (4x8GB) Corsair Vengeance 

Graphics Card: NVIDIA GeForce RTX 3060 Ti

Boot: Crucial P2 500GB (M.2)

SSD: Crucial BX500 1TB

HDD: Seagate ST2000DM001 2TB

HDD: Seagate Barracuda 4TB

PSU: Gigabyte P750GM 750W

Case: IONZ KZ10

Current Laptop:

Spoiler

Name: Lenovo ThinkBook 14 20SL003JUK

CPU: Intel i7-1065G7 @ 3GHz

Graphics: Intel Iris Graphics

RAM: 16GB DDR4 @ 2667MHz

SSD: 480GB Western Digital M.2

Secondary SSD: 240GB Adata SATA

Other Gear:

Spoiler

Phone: Google Pixel 6 (128GB)

Headphones: Steelseries Arctis 3

Microphone: Blue Snowball Ice

Speakers: Creative T100

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not entirely sure what issue(s) you're having, but I have managed to get your code working.

 

Assuming you're in some directory with index.js and config.js:

sudo apt update
sudo apt install build-essential ffmpeg

npm init
npm i --save discord.js node-opus ffmpeg simple-youtube-api ytdl-core

# You might not have to do this.
cd node_modules/node-opus/
npm i -g node-gyp
node-gyp configure build

cd ../../
node index.js

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/24/2018 at 2:32 PM, mshaugh said:

I'm not entirely sure what issue(s) you're having, but I have managed to get your code working.

 

Assuming you're in some directory with index.js and config.js:


sudo apt update
sudo apt install build-essential ffmpeg

npm init
npm i --save discord.js node-opus ffmpeg simple-youtube-api ytdl-core

# You might not have to do this.
cd node_modules/node-opus/
npm i -g node-gyp
node-gyp configure build

cd ../../
node index.js

 

 

Thanks for the help. The issue is that the host is being weird with file permissions so I have transferred it over to a different host for the time being. :) 

Current PC: 

Spoiler

Motherboard: MSI Z390-A PRO

CPU: Intel Core i7-9700K @ 3.60GHz

Memory: 32GB (4x8GB) Corsair Vengeance 

Graphics Card: NVIDIA GeForce RTX 3060 Ti

Boot: Crucial P2 500GB (M.2)

SSD: Crucial BX500 1TB

HDD: Seagate ST2000DM001 2TB

HDD: Seagate Barracuda 4TB

PSU: Gigabyte P750GM 750W

Case: IONZ KZ10

Current Laptop:

Spoiler

Name: Lenovo ThinkBook 14 20SL003JUK

CPU: Intel i7-1065G7 @ 3GHz

Graphics: Intel Iris Graphics

RAM: 16GB DDR4 @ 2667MHz

SSD: 480GB Western Digital M.2

Secondary SSD: 240GB Adata SATA

Other Gear:

Spoiler

Phone: Google Pixel 6 (128GB)

Headphones: Steelseries Arctis 3

Microphone: Blue Snowball Ice

Speakers: Creative T100

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Stentorian said:

Thanks for the help. The issue is that the host is being weird with file permissions so I have transferred it over to a different host for the time being. :)

If you have root access, that won't be a host issue.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 11/27/2018 at 4:22 PM, mshaugh said:

If you have root access, that won't be a host issue.

No I don't have root access. The host if from a friend who is just starting up and it is still in beta so there's a few things that need to be fixed with that. 

Current PC: 

Spoiler

Motherboard: MSI Z390-A PRO

CPU: Intel Core i7-9700K @ 3.60GHz

Memory: 32GB (4x8GB) Corsair Vengeance 

Graphics Card: NVIDIA GeForce RTX 3060 Ti

Boot: Crucial P2 500GB (M.2)

SSD: Crucial BX500 1TB

HDD: Seagate ST2000DM001 2TB

HDD: Seagate Barracuda 4TB

PSU: Gigabyte P750GM 750W

Case: IONZ KZ10

Current Laptop:

Spoiler

Name: Lenovo ThinkBook 14 20SL003JUK

CPU: Intel i7-1065G7 @ 3GHz

Graphics: Intel Iris Graphics

RAM: 16GB DDR4 @ 2667MHz

SSD: 480GB Western Digital M.2

Secondary SSD: 240GB Adata SATA

Other Gear:

Spoiler

Phone: Google Pixel 6 (128GB)

Headphones: Steelseries Arctis 3

Microphone: Blue Snowball Ice

Speakers: Creative T100

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×