How to make a Discord Music Bot • Discord.js (2022)

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

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

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

    This video took me probably a total of like 20 hours to create, so it would be greatly appreciated if you could leave a like if you found it helpful!
    Thank you for watching :)

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

      @Niconiconii hey niconiconii will you make a video on how to keep a bot online 24/7 pls as when I close the VS CODE (where I have written the code) the bot automatically gets offline...

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

      Pls reply 😭

    • @Gort-ft4ey
      @Gort-ft4ey 2 ปีที่แล้ว +1

      @@avgamer8050 he has given sites that'll do that for you

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

      @@Gort-ft4ey where? lol what the point to write that he has given something but no links for it ....

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

      @@avgamer8050 just host the bot bro👍it would be online for months

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

    god bless. you went straight to the point instead of a 5 min long intro or whatever most people do. im hungry for these kinds of tutorials.

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

    What a great and comprehensive tutorial! I wanted to ask about displaying the exact elapsed time of the currently playing song, since I wanted to display that in the info page as well. Regardless, this video tackled the essentials that I was mostly interested with, and I'm glad to say that this is very well done!

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

    Make more of these! I love them and very handy and easy to follow

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

    Great video, really helped get me started on my own bot. I would be super interested in a video going through some of the extensions and settings you use for VS Code.

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

    Thank you i made it work after some tweaks, it needed couple lines to be updates because of new discord.js version.

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

      What did you update if you don't mind me asking?

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

      I wanna know as well pls

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

      look at the github page guys i made a pull request all lines you need to update are there

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

      @@CodeEnthusiast78912 ye I checked it, but is was a mistake on my part haha
      copy paste did the trick :D

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

    thanks man ! its been exactly a year since this video was created, i just realized haha

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

    Hi there niconico! I'm really finding your tutorials very easy to follow. It's been a breeze so far. Though I am curious about the learning curve that's needed to study this. When I went into the discord js documentation it's kind of cryptic and hard to understand. Do you have any tips for someone like me who wants to branch out of the tutorial and learn to navigate on my own?

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

      Practice and just use it. Discord’s api is imo one of the best documentations out there, even though there’s a lot of stuff involved.
      I’m not sure exactly what ur talking about as part of the learning curve (learning how to code in js, or make discord bots). But the essential skills r knowing fundamentals of how to code and knowing how to read documentation and debug code.
      Definitely go off the branch and add ur own features and all. That’s the way to learn. Following tutorials the whole way through with no change will significantly decrease the amount that u learn. Be creative with it. Try to do something engaging with some discord community or come up with features that could be for a public bot. Having feedback from others is very helpful and encouraging!

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

    I think u think like me I was abt to code a music bot and voila you are here :) ❤️

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

      Glad you found it helpful

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

    I always get thrown "No results", no matter which music video i try under 5 minutes length. Can anyone help?

  • @TheNonsenseGuy
    @TheNonsenseGuy ปีที่แล้ว +7

    Hi there! I have snatched your code and fixed up the issues caused by the Discord js changes. The bot now mostly works except for one thing: using the "play" command stops the current song and immediately starts the next one instead of adding it to the queue. It's as if a new queue is created each time. I checked the discord player documentation and it says ".createQueue()" should return the existing queue if there already is one, so I really don't know what the problem is... Do you have a hunch as to what it could be?

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

      hey would you mind to share with me how to fix this code? i'll be much appreciated

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

      im getting a createQueue error too (says its not a function) can you share your code?

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

      @@joneswr1 same bruh

  • @브테-z8y
    @브테-z8y 2 ปีที่แล้ว +2

    I didn't know where to write the prefix.
    Please tell me which file and which line.
    It's easy to follow, but it's hard to understand because I'm not good at English. But I think the video itself is good to follow.

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

      it's a slashcommand handler, sou you just put /(command)

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

    Thank you for the well-explained tutorial.

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

    Hey mate first of all i want to thank you for the easy and good tutorial, first one i actually found good and new. The bot works awsome but i wanted to ask you how do i change the bot initiation from "/" to another key and how do i make the bot like just type "/play speed" instead of having of "/play search searchitem speed"

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

      You can remove the extra options. Try to copy the format from some other slash commands that don’t have the sub options for reference. I also recommend checking out the documentation in the discord-js guide!

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

    Awesome video so easy to follow

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

    he can't find the discord api type module in the index.js can you help me ?

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

    Anyone watching this video and having issues with the queue just doing whatever the hell it wants, run this command in console:
    npm i discord-player@5.3.2
    The recent versions of discord-player are super broken, this will install a version that works for the purposes of this video.

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

      Thank you so much

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

    Thank you so much bro, anyway can you do an extra video on how to make loop command?

  • @ВакуленкоАлексей-у2л
    @ВакуленкоАлексей-у2л 2 ปีที่แล้ว +1

    Will there be updated video/code with new discordjs things?

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

    Discord pushed an update to how they handle things server side that has made the code in this bot obsolete, it will always stop playing music after 1 minute.

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

      I have the same issue

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

    At the beginning you used two npm commands and then at the end you used a node command, are those part of the ffmpeg package?

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

    when i tried to do node index.js load in the terminal i got this error i even tried downloading your files from github and i got the same error i did added the .env file and added TOKEN=my token
    Please could u help me fix this
    Error: Cannot find module 'dotenv'
    Require stack:
    - C:\Users\muham\OneDrive\Desktop\chillbotmusic\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\Users\muham\OneDrive\Desktop\chillbotmusic\index.js:2:16)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\\Users\\user\\OneDrive\\Desktop\\chillbotmusic\\index.js' ]

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

    Hi there, thx for your tutorial, it was quite easy to follow but I have an interesting situation.
    When I activate the bot there are no slash commands on the bot. I already executed the "node index.js load" and the bot was invited with the options "bot" & "application.commands" checked. I must wait a certain time or I missed a step?
    Anyways, great tutorial and thx

  • @L300-nn
    @L300-nn ปีที่แล้ว +1

    Whenever i install the name packages i get like 100 errors and a few warns and i cant really tell what kind some say i miss permission to edit stuff and so on

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

    Note: This problem has been solved. Solution in replies.
    Hi. I'm having a small problem. When I use the "node index.js load" the console says "Deploying slash commands" but then it says "S[50001]: Missing Access". Thanks in advance for help. I'm sure i just made a mistake in code.

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

      i have the same error did you find a waqy to fix it?

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

      Sadly not yet. And the discord server wasn't of any help either.

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

      @@pepinatrojkarova6068 I had the same issue, basically, you're gonna want to go to your discord developer portal, go to OAuth2, check the applications.commands box, then copy the url it generates, paste that url into the browser, then accept the permission on the server you want it on

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

      @@mcmatt186 Thanks a lot. Worked!

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

    Followed the tutorial and managed to deploy it, everything's fine, bot shows online and command list updated to the server.
    However my bot does not respond to my slashcommands. I'm getting "The application did not respond". Any ideas?

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

    awesome video and great community, how do i keep this bot online, i have used replit and a server hosting site in the past but idk how to do it with a local Bot. i am unsure as to how this works.

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

    I downloaded ffmpeg-static, but the audio in my channel only comes out of one speaker/side. Any solution?

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

    Hi this was a great video super easy to understand for someone who has never worked with code before in his life. Was wondering if it was possible to add a prefix to this bot? if so how would you go about doing it ? even if you could point me in the right direction it would be helpful. thank you again.

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

      Slash commands don’t have prefixes. What I would recommend is naming the slash commands individually so they are prefixed with something. For example, instead of /play make it /cplay and instead of /queue make it /cqueue

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

      @@Niconiconii thank you i will try this

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

    I did everything correctly & got the bot to log in, but I don't see the slash commands when I type "/" in my chatroom. Any reasons?

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

      u need to run it with the load option

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

      *node index.js load*
      Hope this helps!

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

    Hey do you have any idea why when I'm skipping a song. It skips the current song + the first song of the queue ? I'm using the same code as you

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

    I'm need python for this?

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

    Can you make a video on hosting this bot? It would be very appreciated.

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

    Can u make a tutorial about trading bots (Like the trading feature of MEE6) ?

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

    Thanks for the video!
    I'm having a few issues though, when I try to play a song from an url, it just returns "No results" to me. when I use the search function, it finds it but I can't hear the bot

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

      Maybe you are missing the audio library

  • @JC-hk4vm
    @JC-hk4vm 2 ปีที่แล้ว

    Really liked your video. Can you please share the VS code extension which you are using to smooth cursor (|) movement? Or is it just your OS? It's buttery smooth and got a cool animation while scrolling

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

      made a tutorial about it on my channel. you should find it in the videos tab of my channel

    • @JC-hk4vm
      @JC-hk4vm 2 ปีที่แล้ว

      @@Niconiconii sure thanks!!

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

    thanks for the tutorial, somehow my bot is joining the channel but there is no audio playing :x I think i have the dependencies installed too...

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

    I can't decide to actually choose language for my bot, Python seems to be much easier, but it has a small amount of tutorials, tho it's very powerful as JS, but JS has much more tutorials. Which one do you guys prefer?

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

      I think JS is not much harder than Python if you decided to follow the video tutorial rather than make it from scratch. I'd say, choose one tutorial that seems detailed enough and just start following that! You can easily try out to use the other one later because you will learn not only how to code but also how discord bots and their codes work.
      But as you pointed out, I think there would not be many beginner's guides, especially for d.py 2.0 or one of its successors, which supports the latest features.
      P.S. I think Python is not very easier than JS technically, it's just way 'less annoying'!

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

      i strongly recommend JS. it's got more tutorials/bigger community as mentioned by neon favor. But additionally, the docs for d.js is 1000x better than the d.py docs. Once you familiarize urself with javascript, if u want really neat and clean code, convert to typescript, which is javascript with typing

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

      @@Niconiconii aswell as discord.py no longer having continued support

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

      @@snxphy woah what happened to that lol

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

      @@Niconiconii i think something to do with discord themselves and the developer giving up, cant remember.

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

    Awesome! Thanks so much

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

    No need to have seperate subcommands, just treat it like a chrome search, if http is present - it's a link. If not, its a query; you can use the actual url to determine if it's a playlist or not

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

    Hello, seems like i have kind of a problem with embed, it says, that MessageEmbed is not a constuctor. Could you please help me? ^_^

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

      Change it to EmbedBuilder

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

    really so helphful,thanksss

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

    wheeze
    thank you again brother

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

    I have a question, does the bot take music from TH-cam? if the bot pulls music from youtube i would like to learn how to make the bot pull music from spotify. Sorry for my English I'm from Spain

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

    thx for the video
    i got it working but i need help with a couple of things
    1-how can i make the bot stay idle in a voice chat for like 5 mins so it doesnt leave as soon as the song is over?
    2-how can i add a command to loop/repeat the current song?
    appreciate the help

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

      did you run into the problem of the guilds not working?

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

    Can you do a loop.js slash command please,maybe added it in github please?Thank you

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

      I will make a follow up video for more features and improvements :)

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

    Wheres the code for actually playing the queue cause I didn't see it?

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

    Nice video, but I would be glad if can make an extra part which explains how to /loop

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

      The way the package handles it makes looping a little harder to do. The video was already quite long so I didn’t want to make it any longer

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

      @@Niconiconii could u do an extra video for the loop command would be really helpful

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

    what about to play 24/7?

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

    hi hopefully you see this comment I'm new to coding In the index.js file when setting up the const why do some have {} example const {REST}

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

    Hello nico, I watched your video teaching you how to make a music bot in discord, I wrote the code the way it was in the video, however when I try to load it says that an error occurred, saying that the code should receive a builder c. I tried everything and even agr could not solve and I would ask for your help. I'm sorry for my bad English, I'm from Brazil and i loved the video.

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

    Hi, thanks for the cool video, but there is a question. When I enter "node index.js load" I get an error
    *index.js:36
    client.slashcommands.set(slashcmd.data.name, slashcmd)
    TypeError: Cannot read properties of undefined (reading 'name')
    *
    The code is exactly the same as in the video

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

      same

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

      if you have an empty .js file in your commands folder, name comes out as undefined cause theres no name in that certain .js file

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

    How would you play spotify songs? Do you have to use any spotify api?

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

      it's done through the discord-player package. I'm not sure exactly how it actually works, but it probably uses an alternative method that isn't using the normal spotify api since that requires an api key which is not necessary for discord-player

  • @Barry-vw3kf
    @Barry-vw3kf 2 ปีที่แล้ว +1

    Love the video but it wont load my slash commands

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

      run this: node index.js load

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

    Thanks, it works perfectly, I just had to spend some time modifying it so it would work with my existing event and slash handlers. You can literally play any TH-cam video lol (as long as it's not over 12 minutes I'm finding, otherwise it'll error out)

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

      Yea it’s something to do with the package there’s fixes but it’s not easy to do

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

      i got an error said 'MessageEmbed is not a constructor'. i would be gladful if you help me

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

    i have a erroer : Error: Cannot find module 'discord.js
    pls help

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

    Hi there I loved the video but I encountered a hiccup, my terminal when trying to make a demo is saying "Cannot find module '@discord-api-types/v9'". Can anyone help me to fix it?

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

    when i tried it with the prefix command, it does send the confirmation message but did not play the song. I am sure that there are no errors with the command, i coded correctly, it searches correctly, i also added error checks, but not playing the song :( what could be the problem? if you want, i can post the code on pastebin and edit this msg adding the url of that.

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

    why is it that none of this matches the actual discord.js documentation?

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

    hey, i can't understand how to download the ffmpeg, can you explain?

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

    SyntaxError: Identifier 'Discord' has already been declared comes up with this what to do?

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

    hey for the queue,
    can u say the command for saving the queue?

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

    My bot automatically logs out after 60 seconds :(

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

    Komutları kullanınca uygulama yanıt vermedi diyor sonra çalışıyor. O uygulama yanıt vermediyi nasıl kaldırabilirim?

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

    any way to make the bot play a file uploaded to discord? ex: upload a mp3 file to discord and make the bot play it

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

      yes it is possible. If you read the discord-player docs you should find more information about this discord-player.js.org/docs/main/master/class/Track
      My guess would you would have to setup something that "streams" the music data constantly to the discord player which would then be able to play it in VC. It does come with some difficulty and I personally do not actually know the specifics of how it would be implemented. You'd have to do some research and poking around on your own.

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

    Like the channel name lol

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

    hi again can you share how you came about building this? you seem to just know how a lot of this works how did you figure it all?

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

      figured it out at some point. u just gotta keep learning and keep building :)

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

    when i try doing node index.js load in the terminal it says
    TypeError: Cannot read properties of undefined (reading 'name'), on the 36th row in index.js

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

      also i closed visual studio code and it gave me the "MODULE_NOT_FOUND" error and can't even do "node ." anymore

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

    After following the video and getting to the last step where I "node index.js load" i get this error. Any suggestions?
    node:internal/modules/cjs/loader:936
    throw err;
    ^
    Error: Cannot find module 'C:\Users\vgarc\Desktop\JS\index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
    code: 'MODULE_NOT_FOUND',
    requireStack: []

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

      U made a typo somewhere probably. Need to see the code. I recommend joining the discord for hekp

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

      @@Niconiconii I also get this error

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

    Can you make tutorial how to make /loop? That will be useful

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

      i dont plan to continue with the music bot series. There's a lot more features that I could've covered here with the bot, but decided not to as the video was already reaching almost an hour long. I recommend you go check out the resources in the video description to read the documentation and think of an implementation strategy yourself. It'll be a great learning exercise. You may also want to join the discord server discord.niconiconii.xyz where there might be others that can help you

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

    My bot isn't responding, the slash commands loaded correctly and i could log in in the terminal tho, how can i fix it? Great tutorial bro, i learned a lot with it

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

      Would need to see code to help u debug. I recommend joining the support server

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

      @@Niconiconii aight, ty again. I really learned so much with you, do you know a website that can host a bot 24/7 for free?

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

      @@Redyf th-cam.com/video/p9rClbMwGjE/w-d-xo.html

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

    Why would you have an /play info command if you can easily fit that also in the queue
    **Currently Playing**: [Song]
    _time-bar_
    **Queue**:
    1...
    2...
    3...

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

      U can merge the two if u want. This is just the style I like lol.

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

      @@Niconiconii I did. Also thanks for the awesome video! Helped me alot understanding how to do a music bot. I did it a bit different since i already had a own event handler and command handler. But i got stuck with how to actually play the songs and so on.
      I also merged all the play commands by filtering the string just to make it a bit cleaner.

  • @Robert-ko2pq
    @Robert-ko2pq ปีที่แล้ว

    is it possible to host this bot on a server? ive done a similar method but when i try and host it it wont work. i think its because i dont know how to install ffmpeg onto the server. do you know if its possible?

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

    I was so excited about how clear and concise this tutorial was... It was so good I was getting concerned. As always, I get an error that I find impossible to fix:
    node:internal/modules/cjs/loader:998
    throw err;
    ^
    Error: Cannot find module '@discord-api-types/v9'
    Any help?

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

      same error. apparently nobody in the fucking world has a fix.

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

      Same problem, have you npm i @discord-api-types ?
      It works for me now

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

      @@SebaSefu For me, it wasn't actually any of that. The coding in this video just wasn't right for some reason. I literally reviewed the video next to my code for over an hour. Then, I sent it to a friend of mine who codes Discord bots, and he was pointing out errors left and right. After he swept through it all and told me what to change, it worked flawlessly.

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

      I'd like to add, this isn't Nico's fault. Things change, and I didn't name my files exactly as he did, so.. There could have been a plethora of different reasons why it didn't work based on just the video.

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

      discord had an update since this video came out. the versions that i have installed may be different. if you go to the github and use the package.json versions you’ll have the same exact code work

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

    @discordjs/opus not working anymore, is this required or can i skip this?

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

    Btw Nico Can I add this code to the bot already coded, followed by ur tutorials. I really want to add this to the main bot

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

      I coded it very differently from the previous tutorials, so it will be a bit difficult to add to the other bot. Music bots tend to be a bit heavier on usage so I recommend keeping them actually separate from your main bot. If you want to use the same bot account you could just use the same token and it will work flawlessly!

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

    hi me again, the bot stopped playing spotify out of the blue...

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

    What's your theme? and great video

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

      tokyo night and thanks!

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

    how would you add autoplay?

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

    Hey, I did everything like you, and when I wanna turn my bot on, this happen:
    Cannot find module 'dotenv'
    Throw err;
    ^
    Require stack:
    *probably 10 or so lines*
    Code: Module not found',
    requireStack: (my disk here)
    }
    Node.js v18.12.1
    [nodemon] app crashed - waiting for file changes before starting

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

      Any help?

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

    Did node index.js load into the terminal and nothing is happening

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

    i followed this tutorial pretty well and the only problem i encountered was with the bot in discord, all the code was perfect, nothing wrong, but in discord, every time i would run a command it would say "the application did not respond" can you please help me

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

      @@notanerdstudent how do i fix it?

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

      @@notanerdstudent i got it to work but now it just says (*bot name) is thinking and nothing else

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

      Feel free to join the discord server for more help discord.niconiconii.xyz

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

      @@marag598 Hi, how did you get it work? I have the same issue...

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

    what do i need to change to change the prefix into a "!"

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

    Im hosting on heroku, but the bot is showing deafened

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

    Is there an updated guide of this? Hate when they change version of language and everything goes shit itself grrr, they changed a lot starting from this GatewayIntentBits and such ... which I managed with low knowledge of node js (always "played"with javascript in rpg maker mv...) to find GatewayIntentBits.Guilds and GatewayIntentBits.GuildVoiceStates but Im getting a error with the collection().

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

      look down

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

    Unfortunately I can't install @discordjs/opus :(

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

    Hello there!

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

    Is there a way to prevent someone from entering a float when trying to skip pages or look at a queue page? Whenever someone entered a float in the field, it would crash my bot.

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

    Bot crashes when i put random letters or numbers on /play song [url: ], is there a way to handle that error? Btw great video, ty!

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

      Use Regex to check it is indeed a yt link

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

      @@Niconiconii fixed, thanks!

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

    Hi. I really liked your way of explaining, but I did some mistakes that I've could fix by mysel or at least most of them, I have this error that says "TypeError: Cannot read properties of undefined (reading 'createQueue') ...\slash\play.js:33:47)" and I'm stuck with that, I don't know what to do. Help please :c

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

      Need more context to the code to help I solve this. I recommend joining the discord suooort server

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

      @@Niconiconii Alright then, and thank you.

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

      how did u fix ?

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

    how do i make that he can find spotify songs?

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

    I love you man

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

    I can start the bot but the slash commands say your not authorized to perform this action

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

      You need to invite the bot with slash command permissions checked in the oauth

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

    another question, the /play playlist bot is not playing the youtube playlist mix, is there any way to make it play?

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

      I think youtube playlist mixes are a bit weird. For some reason it just doesn't work with the playlist things. I'm not sure why. I previously made a music bot that was supposed to be able to use playlists as well and I searched in a completely different method but couldn't get them to work with playlist mixes

  • @retiredff-champ
    @retiredff-champ 2 ปีที่แล้ว +2

    Are you using v13 or which version pls reply.

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

      v13.6

    • @retiredff-champ
      @retiredff-champ 2 ปีที่แล้ว +1

      @@goodboyneon ohh thanks is it a new version which came in November?

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

      yes it is. this is the current stable version for 2022

    • @retiredff-champ
      @retiredff-champ 2 ปีที่แล้ว

      @@Niconiconii thanks !!! Niconiconii

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

    Hi great tutorial but my bot is the hole time on deafened; how can i fix that ?

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

      Its automatically done so for privacy purposes. The bot just won’t listen to any audio in the vc. It can play music regardless

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

      @@Niconiconii i whas forget to install ffmpeg-static

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

    heyy i cant use the slash command you know why ?

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

    Imagine being first, couldn’t be me anyways

  • @hi-fi4df
    @hi-fi4df 2 ปีที่แล้ว

    can u make a prefix command for the music system?

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

      They all use slash commands, so there’s not really a prefix thing.

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

    Not working, when /play searchterm (any song), joins the VC channel, sends the embed with song etc, but no sound and a lot things in console, among others: Cannot play something that has already ended.

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

      It's an ytdl fault.

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

      ​@@_rs2 how can I fix this?

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

      It’s outdated. I will do a new video soon