Create a Music Discord Bot using Discord JS

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 186

  • @Computeshorts
    @Computeshorts  2 ปีที่แล้ว +19

    What other discord bots would you like me to make?

    • @feeninher
      @feeninher 2 ปีที่แล้ว +2

      could you help me? whats your discord

    • @SpaceHero1000
      @SpaceHero1000 2 ปีที่แล้ว +3

      @Computeshorts how can we run the music bot on multiple servers

    • @Computeshorts
      @Computeshorts  2 ปีที่แล้ว +3

      @@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

    • @SpaceHero1000
      @SpaceHero1000 2 ปีที่แล้ว

      @@Computeshorts how would you run an instance per server ?

    • @Computeshorts
      @Computeshorts  2 ปีที่แล้ว +1

      @@SpaceHero1000 just starting everything up as usual with either the node . Command or by using the docker container.

  • @theshortbowwithmasterwork2832
    @theshortbowwithmasterwork2832 ปีที่แล้ว +22

    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.

    • @rimi4014
      @rimi4014 ปีที่แล้ว

      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

    • @theshortbowwithmasterwork2832
      @theshortbowwithmasterwork2832 ปีที่แล้ว

      @@rimi4014 oh yeah there is a typo on my part. it is queues not queue.

    • @rimi4014
      @rimi4014 ปีที่แล้ว

      @@theshortbowwithmasterwork2832 can you give me link to your code pls?Now i have ner error TypeError: MessageEmbed is not a constructor

    • @theshortbowwithmasterwork2832
      @theshortbowwithmasterwork2832 ปีที่แล้ว

      @@rimi4014 My code is not bug free yet as well, but MessageEmbed got replaced by EmbedBuilder()

    • @johannbotha5740
      @johannbotha5740 ปีที่แล้ว

      You are a national treasure

  • @sunnygarf
    @sunnygarf 9 หลายเดือนก่อน

    cheers for the short and sweet tutorial!

  • @hiqqoqotamus
    @hiqqoqotamus ปีที่แล้ว

    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

  • @zSullyy
    @zSullyy ปีที่แล้ว +3

    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

  • @xxkenxyz666
    @xxkenxyz666 2 ปีที่แล้ว +1

    is this bot able to play songs from spotify?

    • @Computeshorts
      @Computeshorts  2 ปีที่แล้ว +2

      Not at the moment but you could use the Spotify api to add this feature in.

    • @037tangerino
      @037tangerino ปีที่แล้ว

      @@Computeshorts How can I use the Spotify API?

  • @horssentc
    @horssentc ปีที่แล้ว +13

    TypeError: Cannot read properties of undefined (reading 'createQueue')
    How can I fix this?

    • @Zaggloobz
      @Zaggloobz 21 วันที่ผ่านมา

      "CREATEQUEUE IS NOT A FUNCTION" ERROR: that part of discordjs has been updated. Replace it with "client.player.queues.create(interaction.guild)"

  • @real.daniello
    @real.daniello 5 หลายเดือนก่อน

    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

  • @037tangerino
    @037tangerino ปีที่แล้ว +3

    How can I make the bot grab music from a platform other than YT?

  • @Matt-ui2bm
    @Matt-ui2bm ปีที่แล้ว +4

    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?

    • @ferreira..
      @ferreira.. ปีที่แล้ว +1

      managed to solve? If yes, help me please.

  • @gabs9324
    @gabs9324 2 ปีที่แล้ว +3

    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?

    • @nicosnico69
      @nicosnico69 ปีที่แล้ว

      you haven't names your command

    • @oofsoul7471
      @oofsoul7471 ปีที่แล้ว

      i also experience the same problem

    • @lordpotaynut2283
      @lordpotaynut2283 ปีที่แล้ว

      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.

  •  11 หลายเดือนก่อน +2

    Hello, can you make a video showing me how to deploy a bot to AWS so it can run 24/7?

  • @justbobdude4742
    @justbobdude4742 2 ปีที่แล้ว +3

    How do you define the FLAGS even. since your own code gives me the same typeError: Cannot read properties of undefined (reading 'FLAGS')

    • @Computeshorts
      @Computeshorts  2 ปีที่แล้ว +1

      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

    • @justbobdude4742
      @justbobdude4742 2 ปีที่แล้ว

      @@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
      @Computeshorts  2 ปีที่แล้ว +1

      If you're using discord js v14 then this might be the answer stackoverflow.com/a/73054552/7175167

    • @justbobdude4742
      @justbobdude4742 2 ปีที่แล้ว

      @@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!

    • @Zirogato
      @Zirogato ปีที่แล้ว

      @@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;"

  • @Slleide
    @Slleide 11 หลายเดือนก่อน

    the bot works, but after about 30 seconds of play it just stops and dont post any error on console

  • @dr_bluegaming
    @dr_bluegaming 9 หลายเดือนก่อน +1

    My bot automatically logs out after 60 seconds :(

  • @panzerjagertigerpelefant
    @panzerjagertigerpelefant 10 หลายเดือนก่อน

    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.

    • @EmptyPain1
      @EmptyPain1 6 หลายเดือนก่อน

      sign up for chatGPT it fixes all your coding mistakes and tells you what wrong and how to fix it

  • @DarioSusanj505
    @DarioSusanj505 ปีที่แล้ว

    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?

  • @VodaFelix
    @VodaFelix 9 หลายเดือนก่อน

    Hello, sorry, I get an error on this line:
    execute: async ({client, interactor}) => {
    In the skip file you know what it can be

    • @Mumin._.
      @Mumin._. 7 หลายเดือนก่อน +1

      No one will just guess your error, send the error code

  • @Denis091294
    @Denis091294 ปีที่แล้ว +6

    It is a really good tutorial. Thank you!

    • @Itzazrael
      @Itzazrael ปีที่แล้ว +2

      Stop lying bro

  • @fawnie1085
    @fawnie1085 ปีที่แล้ว +2

    TypeError: client.player.createQueue is not a function any fixes?

    • @megvzx6590
      @megvzx6590 ปีที่แล้ว +1

      im stuck on this aswell

    • @fawnie1085
      @fawnie1085 ปีที่แล้ว

      @@megvzx6590 brother save yourself dont do this video

    • @charminarchaupal
      @charminarchaupal ปีที่แล้ว

      // 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
      @charminarchaupal ปีที่แล้ว

      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();

    • @LoveMyBomber
      @LoveMyBomber ปีที่แล้ว

      @@charminarchaupal what is nodes?

  • @ashishitD
    @ashishitD 9 หลายเดือนก่อน

    error when installing opus
    i went to the github page to see and it ways the build is failing what to do?

    • @atzomsfm
      @atzomsfm 8 หลายเดือนก่อน

      same

  • @PwNzDeLeOn
    @PwNzDeLeOn ปีที่แล้ว +4

    could you post an updated guide?

  • @radimx61
    @radimx61 ปีที่แล้ว

    my bot won't connect to voice chat, do you know how to fix it?

  • @WhoIsRidhoo
    @WhoIsRidhoo 8 หลายเดือนก่อน +1

    i have problem from npm i @discordjs/opus, Can u help me King 🙏

  • @ivanliew525
    @ivanliew525 ปีที่แล้ว +1

    I got the error queue.play() is not a function, anyone has this issue as well and know how to solve it?

    • @Ivaylo1
      @Ivaylo1 ปีที่แล้ว +1

      same :/

    • @okanbasyigit
      @okanbasyigit ปีที่แล้ว

      "if (!queue.playing) await queue.play()" change this code to " if (!queue.node.isPlaying()) await queue.node.play(),"

  • @traydenpelham9425
    @traydenpelham9425 2 ปีที่แล้ว +1

    at 9:54 how do you go from line 43 and push it up like that

  • @rizking1103
    @rizking1103 ปีที่แล้ว

    Error: Cannot find module 'discord-player'
    Require stack:
    why????? helpp me

    • @ricardomorim9444
      @ricardomorim9444 ปีที่แล้ว

      u didn't installed it at the beggining probably, try to install it as he said in the node packages

  • @packofilms
    @packofilms 2 ปีที่แล้ว +2

    There is no audio in the bot, how can I make it listen?

    • @Rikent
      @Rikent ปีที่แล้ว

      did you find a solution?

    • @037tangerino
      @037tangerino ปีที่แล้ว

      The bot takes music from YT that is the reason

  • @lordpotaynut2283
    @lordpotaynut2283 ปีที่แล้ว +2

    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 TH-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.

    • @alex_turing
      @alex_turing ปีที่แล้ว +1

      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.

    • @00play29
      @00play29 ปีที่แล้ว +1

      @@alex_turing came the decision please

  • @medi573
    @medi573 ปีที่แล้ว

    Any idea why the audio sounds so terrible as well as distorted / laggy?

  • @diwangmittal8067
    @diwangmittal8067 ปีที่แล้ว

    9:54 what the goofball did just happen your code removed 1 line?

  • @DoomeR18G
    @DoomeR18G 5 หลายเดือนก่อน

    I have error when im installing @discordjs\opus. something about python

  • @polsereyrith7555
    @polsereyrith7555 ปีที่แล้ว

    this keeps happening Uncaught Error Error: Cannot find module 'dotenv'

  • @bloodysh6080
    @bloodysh6080 ปีที่แล้ว

    hi, my bot goes online but doesnt show my commands!

  • @ZTBaByy
    @ZTBaByy ปีที่แล้ว

    TypeError: Cannot read properties of undefined (reading 'GUILDS') why?

    • @shaotihk6445
      @shaotihk6445 ปีที่แล้ว +1

      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

  • @toddydog23
    @toddydog23 ปีที่แล้ว +1

    Does anyone else have the problem of queue.skip() skipping 2 songs? I have tried everything

    • @shaotihk6445
      @shaotihk6445 ปีที่แล้ว +1

      I have this not-so-optimal fix. Basically you duplicate the song every time you try to queue one

    • @britannia6690
      @britannia6690 ปีที่แล้ว +1

      The better fix is use discord player 5.3.2

  • @tannerwoslager
    @tannerwoslager 2 ปีที่แล้ว +1

    I do not get how to download the ffmpeg

  • @fynx36
    @fynx36 ปีที่แล้ว +2

    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.

    • @ricardoreyes9348
      @ricardoreyes9348 ปีที่แล้ว +1

      Did you fix this? If so, what was wrong?

    • @JohnSmithino
      @JohnSmithino ปีที่แล้ว +1

      I have the same problem and cant seem to find out how to fix it

    • @NoXvall
      @NoXvall 10 หลายเดือนก่อน +1

      did you fix this? i need help to solve this problem

    • @perfectlkm
      @perfectlkm 6 หลายเดือนก่อน

      Add "client.player.extractors.loadDefault();" after "client.player = new Player(client, {
      ytdlOptions: {
      quality: "highestaudio",
      highWaterMark: 1

  • @roll3r916
    @roll3r916 ปีที่แล้ว +1

    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.

  • @rylsdark
    @rylsdark ปีที่แล้ว

    Bot connects but doesn't play anything. Any help?

    • @unixity_WasTaken
      @unixity_WasTaken ปีที่แล้ว

      its because youtube stopped requests from bots

  • @Rioni
    @Rioni 2 ปีที่แล้ว

    __dirnmae give me error (it says it's not defined in ES module scope)

    • @gazelle1056
      @gazelle1056 2 ปีที่แล้ว

      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)

    • @Rioni
      @Rioni 2 ปีที่แล้ว

      @@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

  • @iRofu
    @iRofu ปีที่แล้ว

    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)

    • @daniRembrandt
      @daniRembrandt ปีที่แล้ว +1

      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

    • @fawnie1085
      @fawnie1085 ปีที่แล้ว +1

      im getting the same im using discord.js v13 and discord-player v3 and still getting this error

    • @crehera
      @crehera ปีที่แล้ว

      const queue = await client.player.nodes.create(interaction.guild); use this

  • @Imduckbybtw
    @Imduckbybtw ปีที่แล้ว

    i just got blocked😥How can i solve that.

  • @gabrielklbr
    @gabrielklbr 2 ปีที่แล้ว +1

    How can I do for the bot always stay activated?

    • @Computeshorts
      @Computeshorts  2 ปีที่แล้ว +1

      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

    • @gabrielklbr
      @gabrielklbr 2 ปีที่แล้ว +1

      ​@@Computeshorts Thanks but before you answer me i watched a video how to host and i do with Heroku but thanks

  • @dibll0835
    @dibll0835 2 ปีที่แล้ว +5

    TypeError: Cannot read properties of undefined (reading 'FLAGS')

    • @meme4memes
      @meme4memes ปีที่แล้ว

      same , find any fix ?

    • @matthewcollett2281
      @matthewcollett2281 ปีที่แล้ว +2

      Intents changed to GatewayIntentBits, and then you can change it like such
      const client = new Client({
      intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates]
      });

    • @matthewcollett2281
      @matthewcollett2281 ปีที่แล้ว

      @@meme4memes see thread

  • @Adraiox2014
    @Adraiox2014 7 หลายเดือนก่อน

    can spotify play song links?

  • @unhxppiness
    @unhxppiness 9 หลายเดือนก่อน

    hey why are you just not installing ffmpeg npm library ?

    • @unhxppiness
      @unhxppiness 9 หลายเดือนก่อน

      instead of all of this system option tweaks

    • @unhxppiness
      @unhxppiness 9 หลายเดือนก่อน

      i enjoyed the video tho :)

  • @pjdj4027
    @pjdj4027 2 ปีที่แล้ว +1

    tutorial on how to use with docker?

  • @Stella-yb5jh
    @Stella-yb5jh ปีที่แล้ว

    slash commands do not appear in discord:(

    • @gabrielzirondi7913
      @gabrielzirondi7913 ปีที่แล้ว +1

      have you found the solution?

    • @bloodysh6080
      @bloodysh6080 ปีที่แล้ว

      @@gabrielzirondi7913 i have this same issue. any up date?

  • @BryceTheFire
    @BryceTheFire ปีที่แล้ว +2

    bro whyd you speed it up at the stuff bruh your goofy

  • @NikolaToncev6ix
    @NikolaToncev6ix ปีที่แล้ว

    ReferenceError: EmbedBuilder is not defined
    is the error i get

  • @evancio
    @evancio 2 ปีที่แล้ว +2

    I always get this error on Player.js
    TypeError: discord_js_1.IntentsBitField is not a constructor

    • @fuwaakira516
      @fuwaakira516 2 ปีที่แล้ว +1

      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

    • @shaotihk6445
      @shaotihk6445 ปีที่แล้ว

      @@fuwaakira516 I am now getting a TypeError: Cannot read properties of undefined (reading 'GuildMessages')

    • @fuwaakira516
      @fuwaakira516 ปีที่แล้ว

      @@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

    • @shaotihk6445
      @shaotihk6445 ปีที่แล้ว +1

      @@fuwaakira516 Thank you. It turns out I didnt allow intents.

  • @lakindulorensuhewa
    @lakindulorensuhewa 23 วันที่ผ่านมา

    bro slow down any one can't understand when you telling this much fast slow douwn

  • @pump9102
    @pump9102 ปีที่แล้ว +3

    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
      @SebaSefu ปีที่แล้ว

      Found the solution? I have the same problem

    • @Jogender-jt7kb
      @Jogender-jt7kb ปีที่แล้ว

      NotDevansh#6554

    • @omerbalter9141
      @omerbalter9141 ปีที่แล้ว

      @@SebaSefu I used const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildVoiceStates] }); GatewayIntentBits is imported from discord.js

    • @huski6862
      @huski6862 ปีที่แล้ว

      @@Jogender-jt7kb I Have a same problem, could u help me please?

    • @elblogdejojan5453
      @elblogdejojan5453 ปีที่แล้ว

      you found the solution i have same problem

  • @charminarchaupal
    @charminarchaupal ปีที่แล้ว

    TH-cam has blocked all discord bots which is why you will get stream error even when all the code is correct

  • @Im-a-man
    @Im-a-man 2 ปีที่แล้ว

    12:35

  • @harshjaiswal9717
    @harshjaiswal9717 ปีที่แล้ว

    how to earn money by free discord bot

  • @31.daanii
    @31.daanii 2 ปีที่แล้ว

    I don´t speak Taka Taka bro, sorry.Dislike

    • @WalyMTY
      @WalyMTY 2 ปีที่แล้ว +1

      poor ignornate lmao

  • @trigeeeagleye
    @trigeeeagleye ปีที่แล้ว

    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: []
    }

  • @diwangmittal8067
    @diwangmittal8067 ปีที่แล้ว

    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

  • @satriogurunej1028
    @satriogurunej1028 6 หลายเดือนก่อน

    my @discordjs/opus is erorr any1 can fix it?

    • @ahmedali9271
      @ahmedali9271 6 หลายเดือนก่อน

      did u solve it?

    • @landjaager
      @landjaager 3 หลายเดือนก่อน

      @@ahmedali9271 look my reply

    • @vincentthe1st
      @vincentthe1st 22 วันที่ผ่านมา

      @@ahmedali9271 th-cam.com/video/mUQTI6Fk6RQ/w-d-xo.html

  • @Girlhead
    @Girlhead ปีที่แล้ว +2

    Just LOVE IT when these horrible videos SKIP STEPS. Thanks.

  • @ryfiction
    @ryfiction ปีที่แล้ว

    What if i want prefix instead of slash commands.

  • @salilfernandes4947
    @salilfernandes4947 ปีที่แล้ว

    TypeError: client.player.createQueue is not a function, any solution to this error?

    • @u4ifficial
      @u4ifficial ปีที่แล้ว

      replace it with client.player.queues.create(interaction.guild)

  • @Zen1thCZ
    @Zen1thCZ 2 ปีที่แล้ว

    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?

    • @gazelle1056
      @gazelle1056 2 ปีที่แล้ว

      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"