@@SpaceHero1000 if your bot is begining to be slow and you want to spin up multiplr instances then you shohldnt need to do any adjustments to the code and simply start multiple instances of the program. If your bot needs connection to over 2500 servers then you will need to have a look at sharding discordjs.guide/sharding/#when-to-shard
FOR ANYONE GETTING THE "CREATEQUEUE IS NOT A FUNCTION" ERROR: that part of discordjs has been updated. Replace it with "client.player.queues.create(interaction.guild)" Be aware I'm myself not done with this tutorial so I'll update the comment (probably) if any other stuff comes up.
hello, so are u fix this problem? I think that "client.player.queue.create(interaction.guild) doesn't work at all in my case cuz in result we get queue undefined
Hey, I got the following Error: "TypeError: command.execute is not a function" ... what should I do now? I also tried command.run but it got the same error
i keep getting an error that getQueue is undefined, but i logged the queue into the console and can confirm that the queue is getting data. for whatever reason, its not reading it in. any ideas?
on mine it is giving the error TypeError: Cannot read properties of undefined (reading 'name') in client.commands.set(command.data.name ,command); what can i do to solve it?
I just went through ALL of my commands and found the error: You have to make sure that every one of your commands is properly formatted and says "module.exports" instead of "module.export". If ONE SINGLE COMMAND isn't formatted correctly it'll throw that error every time you run it no matter what.
Did you import intents from discord.js? Also you'll need to make sure to say Intents.FLAGS.flagname. Have a look at this file github.com/pawel02/discord-js-music-bot/blob/main/index.js especially line 5-13
@@Computeshorts Hi thanks for replying heres my code which is exactly copied still get the same error i've imported everything written in the video require('dotenv').config(); const {REST} = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v9'); const { Client, Intents, Collection } = require('discord.js'); const { Player } = require("discord-player"); const fs = require('fs'); const path = require('path'); const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_VOICE_STATES] }); this is line 1 to 14 and i still get the same error
@@Computeshorts hey thanks for replying i'm guessing since i coded on something like v14 i might have more problems cuz now the bot goes online but instead it gives me an error while trying to play a playlist that interaction.isCommand is not a function and thats for the interaction create im guessing fixing this might fix the entire thing! But the flags problem is now fixed with that so thank you. but if you have anything solvable around "interaction.isCommand" is not a function please tell me!
@@justbobdude4742 Im not sure at 100% but you can try to add : "const { InteractionType} = require("discord.js") and change line to : "if(!InteractionType.ApplicationCommand()) return;"
What version of the discord api are you using I'm getting an error and I think I might have to downgrade. Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules/discord-api-types/package.json
The bot stops playing the song after ~1 min, always at the same time, with no errors in the console. Has anyone encountered this problem and knows how to fix?
// Create a play queue for the server const queue = await client.Player.nodes.create(interaction.guild); // Wait until you are connected to the channel if (!queue.connection) await queue.connect(interaction.member.voice.channel) let embed = new EmbedBuilder();
heres the solution // Create a play queue for the server const queue = await client.Player.nodes.create(interaction.guild); // Wait until you are connected to the channel if (!queue.connection) await queue.connect(interaction.member.voice.channel) let embed = new EmbedBuilder();
Any clue what's gone wrong? I get this error. node:internal/modules/cjs/loader:573 throw e; ^ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\musicbot ode_modules\discord-api-types\package.json at new NodeError (node:internal/errors:405:5) at exportsNotFound (node:internal/modules/esm/resolve:359:10) at packageExportsResolve (node:internal/modules/esm/resolve:695:9) at resolveExports (node:internal/modules/cjs/loader:567:36) at Module._findPath (node:internal/modules/cjs/loader:636:31) at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27) at Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:121:18) at Object. (C:\musicbot\index.js:4:18) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' } I'd appreciate any answers as to how to solve it.
Finished the tutorial, ended up having so many problems I just had to go to Github and copy the code from there, and even with that it doesn't work properly! Eventually I got the bot to connect to the voice channel, but no matter what UA-cam link I put in it just said it couldn't find the video. Unfortunately a complete waste of 3 hours of my time, but I don't know if it was the tutorial or the libraries at this point. Don't bother with Discord bots.
Me too but I didn't expect this to work right away. That's how it is with old videos. You got to do some more debugging and check documentations. Still trying to solve the couldn't find the video problem, reply to this if you want to know the solution and I will send it later.
Does anyone have an idea how I can fix this error? (node:8304) [NoExtractors] Warning: Skipping the execution of extractors because no extractors were registered.
Intents changed to GatewayIntentBits, and then you can change it like such const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] });
If you copied his code line by line, and you copied and pasted the error, it's most likely due to a typo. "__dirnmae" should be "__dirname". (dirname = directory name)
@@gazelle1056 ups, I mistyped it here. I wrote it __dirname but since I'm writing using EMS standard instead of cjs I got an error. I was able to solve it looking in stackoverflow
You'll need to deploy it to a server that runs 24/7 there are many cloud providers out there such as aws, gcp or azure and most of them offer a free tier
Anybody knows why im getting this error? TypeError: client.player.createQueue is not a function at Object.execute (C:\Users\\Desktop\\discord-bot\commands\play.js:34:37) at Client. (C:\Users\\Desktop\\discord-bot\index.js:60:23) at Client.emit (node:events:513:28) at InteractionCreateAction.handle (C:\Users\\Desktop\\discord-bot ode_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
Hi, I got the same error and it seems that this function doesn't exist in the latest version of discord-player. I tried downgrading it to 5.3.2 that has it. The error has disappeared but now I can't seem to be able to make the bot play any music, it just joins the channel and stays there without playing anything
If you don't have node.js installed, that's most likely your problem. If you do have node.js installed, and rebooting you computer hasn't fixed the issue, kill the Terminal on VS Code, and start a new one. If that hasn't worked, add a semicolon to the end of the Path Variable as below. ;C:\Program Files odejs\ You can find that through Computer > Advanced System Settings > Advanced > Environment Variables > click on "PATH" and "Edit"
i got a error rlly similar, what i did to fix it is use "GatewayIntentBits" instead of "IntentsBitFields" here code: const { Client, GatewayIntentBits, Collection } = require("discord.js"); const client = new Client({ intents: [ GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildScheduledEvents, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildVoiceStates, ], }); you will obviously replace the intents for which you are gonna use
TypeError: Cannot read properties of undefined (reading 'FLAGS') at Object. (C:\Users\camer\programs\musicbot\index.js:14:23) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 anyone know whats wrong?
@@SebaSefu I used const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] }); GatewayIntentBits is imported from discord.js
C:\Users\Admin\Downloads\bot\index.js:24 const filepath = path.join(commandsPath, file); ^ ReferenceError: file is not defined at Object. (C:\Users\Admin\Downloads\bot\index.js:24:46) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 Node.js v18.17.1 PS C:\Users\Admin\Downloads\bot> how do i fix this
It might be due to restriction on intents. Go to the developer portal and find your application. Go to bot section and enable the privileged gateway intents
What other discord bots would you like me to make?
could you help me? whats your discord
@Computeshorts how can we run the music bot on multiple servers
@@SpaceHero1000 if your bot is begining to be slow and you want to spin up multiplr instances then you shohldnt need to do any adjustments to the code and simply start multiple instances of the program. If your bot needs connection to over 2500 servers then you will need to have a look at sharding discordjs.guide/sharding/#when-to-shard
@@Computeshorts how would you run an instance per server ?
@@SpaceHero1000 just starting everything up as usual with either the node . Command or by using the docker container.
FOR ANYONE GETTING THE "CREATEQUEUE IS NOT A FUNCTION" ERROR: that part of discordjs has been updated. Replace it with "client.player.queues.create(interaction.guild)"
Be aware I'm myself not done with this tutorial so I'll update the comment (probably) if any other stuff comes up.
hello, so are u fix this problem? I think that "client.player.queue.create(interaction.guild) doesn't work at all in my case cuz in result we get queue undefined
@@rimi4014 oh yeah there is a typo on my part. it is queues not queue.
@@theshortbowwithmasterwork2832 can you give me link to your code pls?Now i have ner error TypeError: MessageEmbed is not a constructor
@@rimi4014 My code is not bug free yet as well, but MessageEmbed got replaced by EmbedBuilder()
You are a national treasure
cheers for the short and sweet tutorial!
Hello, can you make a video showing me how to deploy a bot to AWS so it can run 24/7?
could you post an updated guide?
TypeError: Cannot read properties of undefined (reading 'createQueue')
How can I fix this?
"CREATEQUEUE IS NOT A FUNCTION" ERROR: that part of discordjs has been updated. Replace it with "client.player.queues.create(interaction.guild)"
How can I make the bot grab music from a platform other than YT?
gotta leave a comment on this one, new pesron TURN BACK DONT DO THIS TUT, esp if u new to coding, this filled with bugs.
Hello, I use discord.js v13.5 and discord-player 3.3.1 | I get this error TypeError: client.player.createQueue is not a function in play.js
Hey, I got the following Error:
"TypeError: command.execute is not a function"
... what should I do now? I also tried command.run but it got the same error
i think this is an outdated code
My bot automatically logs out after 60 seconds :(
It is a really good tutorial. Thank you!
Stop lying bro
i keep getting an error that getQueue is undefined, but i logged the queue into the console and can confirm that the queue is getting data. for whatever reason, its not reading it in. any ideas?
managed to solve? If yes, help me please.
i have problem from npm i @discordjs/opus, Can u help me King 🙏
on mine it is giving the error TypeError: Cannot read properties of undefined (reading 'name') in client.commands.set(command.data.name ,command); what can i do to solve it?
you haven't names your command
i also experience the same problem
I just went through ALL of my commands and found the error: You have to make sure that every one of your commands is properly formatted and says "module.exports" instead of "module.export". If ONE SINGLE COMMAND isn't formatted correctly it'll throw that error every time you run it no matter what.
How do you define the FLAGS even. since your own code gives me the same typeError: Cannot read properties of undefined (reading 'FLAGS')
Did you import intents from discord.js? Also you'll need to make sure to say Intents.FLAGS.flagname. Have a look at this file github.com/pawel02/discord-js-music-bot/blob/main/index.js especially line 5-13
@@Computeshorts Hi thanks for replying heres my code which is exactly copied still get the same error i've imported everything written in the video
require('dotenv').config();
const {REST} = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { Client, Intents, Collection } = require('discord.js');
const { Player } = require("discord-player");
const fs = require('fs');
const path = require('path');
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_VOICE_STATES]
});
this is line 1 to 14 and i still get the same error
If you're using discord js v14 then this might be the answer stackoverflow.com/a/73054552/7175167
@@Computeshorts hey thanks for replying i'm guessing since i coded on something like v14 i might have more problems cuz now the bot goes online but instead it gives me an error while trying to play a playlist that interaction.isCommand is not a function and thats for the interaction create im guessing fixing this might fix the entire thing!
But the flags problem is now fixed with that so thank you. but if you have anything solvable around "interaction.isCommand" is not a function please tell me!
@@justbobdude4742 Im not sure at 100% but you can try to add : "const { InteractionType} = require("discord.js") and change line to : "if(!InteractionType.ApplicationCommand()) return;"
Does anyone else have the problem of queue.skip() skipping 2 songs? I have tried everything
I have this not-so-optimal fix. Basically you duplicate the song every time you try to queue one
The better fix is use discord player 5.3.2
I got the error queue.play() is not a function, anyone has this issue as well and know how to solve it?
same :/
"if (!queue.playing) await queue.play()" change this code to " if (!queue.node.isPlaying()) await queue.node.play(),"
What version of the discord api are you using I'm getting an error and I think I might have to downgrade. Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules/discord-api-types/package.json
Hello, sorry, I get an error on this line:
execute: async ({client, interactor}) => {
In the skip file you know what it can be
No one will just guess your error, send the error code
The bot stops playing the song after ~1 min, always at the same time, with no errors in the console. Has anyone encountered this problem and knows how to fix?
the bot works, but after about 30 seconds of play it just stops and dont post any error on console
TypeError: client.player.createQueue is not a function any fixes?
im stuck on this aswell
@@megvzx6590 brother save yourself dont do this video
// Create a play queue for the server
const queue = await client.Player.nodes.create(interaction.guild);
// Wait until you are connected to the channel
if (!queue.connection) await queue.connect(interaction.member.voice.channel)
let embed = new EmbedBuilder();
heres the solution
// Create a play queue for the server
const queue = await client.Player.nodes.create(interaction.guild);
// Wait until you are connected to the channel
if (!queue.connection) await queue.connect(interaction.member.voice.channel)
let embed = new EmbedBuilder();
@@charminarchaupal what is nodes?
bro slow down any one can't understand when you telling this much fast slow douwn
at 9:54 how do you go from line 43 and push it up like that
Any clue what's gone wrong? I get this error.
node:internal/modules/cjs/loader:573
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\musicbot
ode_modules\discord-api-types\package.json
at new NodeError (node:internal/errors:405:5)
at exportsNotFound (node:internal/modules/esm/resolve:359:10)
at packageExportsResolve (node:internal/modules/esm/resolve:695:9)
at resolveExports (node:internal/modules/cjs/loader:567:36)
at Module._findPath (node:internal/modules/cjs/loader:636:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at Object. (C:\musicbot\index.js:4:18) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
I'd appreciate any answers as to how to solve it.
sign up for chatGPT it fixes all your coding mistakes and tells you what wrong and how to fix it
Finished the tutorial, ended up having so many problems I just had to go to Github and copy the code from there, and even with that it doesn't work properly! Eventually I got the bot to connect to the voice channel, but no matter what UA-cam link I put in it just said it couldn't find the video. Unfortunately a complete waste of 3 hours of my time, but I don't know if it was the tutorial or the libraries at this point. Don't bother with Discord bots.
Me too but I didn't expect this to work right away. That's how it is with old videos. You got to do some more debugging and check documentations. Still trying to solve the couldn't find the video problem, reply to this if you want to know the solution and I will send it later.
@@alex_turing came the decision please
tutorial on how to use with docker?
I have error when im installing @discordjs\opus. something about python
ua-cam.com/video/mUQTI6Fk6RQ/v-deo.html
@@ДаниилДьяков-д8й woah thanks bro
error when installing opus
i went to the github page to see and it ways the build is failing what to do?
same
9:54 what the goofball did just happen your code removed 1 line?
this keeps happening Uncaught Error Error: Cannot find module 'dotenv'
There is no audio in the bot, how can I make it listen?
did you find a solution?
The bot takes music from YT that is the reason
Does anyone have an idea how I can fix this error?
(node:8304) [NoExtractors] Warning: Skipping the execution of extractors because no extractors were registered.
Did you fix this? If so, what was wrong?
I have the same problem and cant seem to find out how to fix it
did you fix this? i need help to solve this problem
Add "client.player.extractors.loadDefault();" after "client.player = new Player(client, {
ytdlOptions: {
quality: "highestaudio",
highWaterMark: 1
hi, my bot goes online but doesnt show my commands!
I do not get how to download the ffmpeg
Error: Cannot find module 'discord-player'
Require stack:
why????? helpp me
u didn't installed it at the beggining probably, try to install it as he said in the node packages
Any idea why the audio sounds so terrible as well as distorted / laggy?
Bot connects but doesn't play anything. Any help?
its because youtube stopped requests from bots
my bot won't connect to voice chat, do you know how to fix it?
TypeError: Cannot read properties of undefined (reading 'FLAGS')
same , find any fix ?
Intents changed to GatewayIntentBits, and then you can change it like such
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates]
});
@@meme4memes see thread
__dirnmae give me error (it says it's not defined in ES module scope)
If you copied his code line by line, and you copied and pasted the error, it's most likely due to a typo.
"__dirnmae" should be "__dirname". (dirname = directory name)
@@gazelle1056 ups, I mistyped it here. I wrote it __dirname but since I'm writing using EMS standard instead of cjs I got an error. I was able to solve it looking in stackoverflow
i just got blocked😥How can i solve that.
How can I do for the bot always stay activated?
You'll need to deploy it to a server that runs 24/7 there are many cloud providers out there such as aws, gcp or azure and most of them offer a free tier
@@Computeshorts Thanks but before you answer me i watched a video how to host and i do with Heroku but thanks
can spotify play song links?
Anybody knows why im getting this error?
TypeError: client.player.createQueue is not a function
at Object.execute (C:\Users\\Desktop\\discord-bot\commands\play.js:34:37)
at Client. (C:\Users\\Desktop\\discord-bot\index.js:60:23)
at Client.emit (node:events:513:28)
at InteractionCreateAction.handle (C:\Users\\Desktop\\discord-bot
ode_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
Hi, I got the same error and it seems that this function doesn't exist in the latest version of discord-player. I tried downgrading it to 5.3.2 that has it. The error has disappeared but now I can't seem to be able to make the bot play any music, it just joins the channel and stays there without playing anything
im getting the same im using discord.js v13 and discord-player v3 and still getting this error
const queue = await client.player.nodes.create(interaction.guild); use this
bro whyd you speed it up at the stuff bruh your goofy
This is no longer functional.
VS Code problem:' npm' is not recognized as an internal or external command,
operable program or batch file. how the hack od i fix that?
If you don't have node.js installed, that's most likely your problem.
If you do have node.js installed, and rebooting you computer hasn't fixed the issue, kill the Terminal on VS Code, and start a new one.
If that hasn't worked, add a semicolon to the end of the Path Variable as below.
;C:\Program Files
odejs\
You can find that through Computer > Advanced System Settings > Advanced > Environment Variables > click on "PATH" and "Edit"
is this bot able to play songs from spotify?
Not at the moment but you could use the Spotify api to add this feature in.
@@Computeshorts How can I use the Spotify API?
ReferenceError: EmbedBuilder is not defined
is the error i get
same idk how to fix
hey why are you just not installing ffmpeg npm library ?
instead of all of this system option tweaks
i enjoyed the video tho :)
slash commands do not appear in discord:(
have you found the solution?
@@gabrielzirondi7913 i have this same issue. any up date?
I always get this error on Player.js
TypeError: discord_js_1.IntentsBitField is not a constructor
i got a error rlly similar, what i did to fix it is use "GatewayIntentBits" instead of "IntentsBitFields"
here code:
const { Client, GatewayIntentBits, Collection } = require("discord.js");
const client = new Client({
intents: [
GatewayIntentBits.GuildMessages,
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildScheduledEvents,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildVoiceStates,
],
});
you will obviously replace the intents for which you are gonna use
@@fuwaakira516 I am now getting a TypeError: Cannot read properties of undefined (reading 'GuildMessages')
@@shaotihk6445 You have to autorize your bot to read messages, i had that one too, there are youtube video to solve them so dont worry, its not hard
@@fuwaakira516 Thank you. It turns out I didnt allow intents.
TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object. (C:\Users\camer\programs\musicbot\index.js:14:23)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
anyone know whats wrong?
Found the solution? I have the same problem
NotDevansh#6554
@@SebaSefu I used const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] }); GatewayIntentBits is imported from discord.js
@@Jogender-jt7kb I Have a same problem, could u help me please?
you found the solution i have same problem
12:35
UA-cam has blocked all discord bots which is why you will get stream error even when all the code is correct
how to earn money by free discord bot
...
you cant earn money by the bot
I don´t speak Taka Taka bro, sorry.Dislike
poor ignornate lmao
C:\Users\Admin\Downloads\bot\index.js:24
const filepath = path.join(commandsPath, file);
^
ReferenceError: file is not defined
at Object. (C:\Users\Admin\Downloads\bot\index.js:24:46)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js v18.17.1
PS C:\Users\Admin\Downloads\bot>
how do i fix this
my @discordjs/opus is erorr any1 can fix it?
did u solve it?
@@ahmedali9271 look my reply
@@ahmedali9271 ua-cam.com/video/mUQTI6Fk6RQ/v-deo.html
You have to change the version of Node.js, at least that fixed the problem for me
node .
node:internal/modules/cjs/loader:988
throw err;
^
Error: Cannot find module '/home/runner/Smart-Bot'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Just LOVE IT when these horrible videos SKIP STEPS. Thanks.
TypeError: Cannot read properties of undefined (reading 'GUILDS') why?
It might be due to restriction on intents. Go to the developer portal and find your application. Go to bot section and enable the privileged gateway intents
What if i want prefix instead of slash commands.
TypeError: client.player.createQueue is not a function, any solution to this error?
replace it with client.player.queues.create(interaction.guild)