#RestError: Bad Request

1 messages · Page 1 of 1 (latest)

dense tusk
#

Hello!

I keep getting this error when trying to play music on my bot:

  <rejected> RestError: Bad Request
      at Rest.fetch (C:\Users\imath\Downloads\WaveMusic-3\node_modules\shoukaku\dist\index.js:991:13)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Player.update (C:\Users\imath\Downloads\WaveMusic-3\node_modules\shoukaku\dist\index.js:711:5) {
    timestamp: 1733961740293,
    status: 400,
    error: 'Bad Request',
    trace: undefined,
    path: '/v4/sessions/3imxbi0fc4kmy24w/players/1246972743405277255'
  }
} reason: RestError: Bad Request
    at Rest.fetch (C:\Users\imath\Downloads\WaveMusic-3\node_modules\shoukaku\dist\index.js:991:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Player.update (C:\Users\imath\Downloads\WaveMusic-3\node_modules\shoukaku\dist\index.js:711:5) {
  timestamp: 1733961740293,
  status: 400,
  error: 'Bad Request',
  trace: undefined,
  path: '/v4/sessions/3imxbi0fc4kmy24w/players/1246972743405277255'
}```

I'm new to lavalink, not sure how the application.yml and plugins should be setup.. I've went through a lot of videos + github installations and I still can't figure out why. I'll leave my application.yml and plugin folder in this chat. Any help would be amazing!
#

^^, I have lavasrc-plugin-4.3.0.jar youtube-plugin-1.11.1.jar inside my plugins folder.

raw kindle
#

Please, don't use WaveMusic, is outdated

#

And also, here is not the right place to ask for support, since is a bot-related issue

dense tusk
#

and where do I find support, Sorry I don't know.

raw kindle
#

I don't remember if is the way in how the track is loaded or what is causing the issue

dense tusk
raw kindle
#

Go to: src > structures > Dispatcher.js

#

Search the play method

dense tusk
raw kindle
#

In your files

#

Or the downloaded repo, or whatever you have

dense tusk
#

I'm just worried about having an issue with my config

#

cause everything I've seen online suggests an issue with my config.

#

I've tried coding a play command myself using the docs but I just keep getting the same error

raw kindle
#

Replace the line 57

#
- this.player.playTrack({ track: this.current?.encoded });
+ this.player.playTrack({ track: { encoded: this.current?.encoded } });
dense tusk
#

okay

raw kindle
#

And maybe your issue will be resolved

dense tusk
raw kindle
#

You need to use youtube-source

#

disable the lavalink's default youtube source

dense tusk
#

Ah okay

#

in config yes?

raw kindle
#

yup

dense tusk
#

this section?

raw kindle
#

sources > youtube

#

and add youtube-source plugin

dense tusk
#

oo okay just add a line ?

raw kindle
dense tusk
#

this should work then right

dense tusk
#

the layouts really confusing for me..

dense tusk
#

request for login..?

raw kindle
#

More info are available in the youtube-source readme

dense tusk
#

alright thanks :>

raw kindle
#

yw

dense tusk
raw kindle
#

I think that file is wrong

dense tusk
#

ah

#

do u have the right format or smt this is driving me insane

raw kindle
#

I think you can use this file: #1312408954105757838 message

#

Just fill the ouath token or pot data

dense tusk
#

okay Ill give that a try

dense tusk
shrewd rose
#

I dont think you put in the right place

dense tusk
#

o

#

I can send you my config file if you wanna take a look

shrewd rose
#

Send it here

dense tusk
#

I will give me a second :>

dense tusk
shrewd rose
#

httpConfig and playerConfig arent the valid option

dense tusk
#

alright

dense tusk
raw kindle
#

you forgot add the plugins

shrewd rose
dense tusk
shrewd rose
#

Read it

dense tusk
#

it is a burner 😭

shrewd rose
#

You need to grant access lavalink to use your google BURNER account

raw kindle
#

Basically an account that you don't use

dense tusk
#

my lord this is so complicatred just to get music to work

#

uhh

#

wtf is this 😭

#

it doesnt even ask me what account

shrewd rose
#

Enter this code

dense tusk
#

ohh i see

raw kindle
dense tusk
#

alr it gave me a refresh token

#

do i just try it again now

shrewd rose
#

yes

#

just try it again

#

it should working

dense tusk
#

oh my lord

#

that

#

took

#

30 hours

#

thank you guys

#

so much

#

<3

#

okay wait last thing do I need the yt plugins thing

#

the music does work tho

#

okay i restarted it and its giving me thsi error again

#

oh my god

#

do i have to auth

#

every time i restart the bot?

raw kindle
#

Nope

#

Just set the refreshToken in the application.yml

dense tusk
#

ah

shrewd rose
dense tusk
#

ty

#

should I keep the other auth methods aswell as the refresh token or jsut refresh

dense tusk
shrewd rose
#

wdym not working

dense tusk
#

Its just saying the sus links or wtv

shrewd rose
#

Have you tried to play a song?

dense tusk
#

yeah i have

#

with that config

shrewd rose
#

Post the logs

dense tusk
#

in console it gives me like

#

the weird paste code thing

#

even tho Im using refresh token

#

do I have to do it a final time or smt

shrewd rose
#

Can you post the full of logs?

dense tusk
#

yeah one second

shrewd rose
#

Maybe enable debug logs

#

will be much better

dense tusk
#

uhh thats a config thing right

dense tusk
#

ty

raw kindle
#

If this yml is correct, the oauth part should not be show

dense tusk
#

can u check this for me :P

raw kindle
raw kindle
dense tusk
raw kindle
#

yeah

dense tusk
raw kindle
#

I think you have more files than you should

dense tusk
#

huhh

#

wdym

raw kindle
dense tusk
#

ohh oops

#

i have 1 in my thing

#

i just have multiple

#

on my pc

#

cause im going through

#

different versions

#

thats my ec2 server

raw kindle
#

Which one are you using right now?

dense tusk
#

im just editing the different versions on my pc, then copy pasting it on my ec2 sever

raw kindle
#

oh

dense tusk
#

that one

raw kindle
#

And where are the plugins?

#

plugins: null

dense tusk
#

uhh

#

ksdljf

#

my bad

raw kindle
#

-# You should reset those credentials after noborata

#

Where did you get that plugin?

#

plugin-youtube

dense tusk
#

oh thats deff wrong

#

crap

#

i just used one from above cause i remember i had

#

the yt plugin

#

before i used a new config

#

oh my lord this is

#

okok one sec

#

what should the right one be...

#

this one right

dense tusk
#

this?

dense tusk
raw kindle
dense tusk
#

huh

#

where..

raw kindle
dense tusk
#

okkay ty

dense tusk
raw kindle
#

I think, yes

shrewd rose
#

Indeed if you dont need other sources than youtube

dense tusk
#

okok

raw kindle
#

Oh

#

ok

#

makes sense

dense tusk
#

am i setting the creds wrong somewhree

dense tusk
raw kindle
#

Disable the default youtube source

dense tusk
#

ohh okay

raw kindle
#

For some reason, it's enabled

dense tusk
#

woah seems to be working now >:P

#

hopefully i wont be back here begging yall for help

#

thank you guys so much :>

raw kindle
#

Now, reset those credentials noborata

dense tusk
#

yessir

raw kindle
#

Next time

brittle lanternBOT
#

Please make sure to read and follow the post guidelines before opening your post.
This will help you get the best possible answers to your questions while minimizing the questions we have to ask you.
Thanks!

dense tusk
#

I will

raw kindle
#

If is related to lavalink

dense tusk
#

sorry and thanks :>