Im using Discord.js V13 and when i try to run the bot i get this error everytime. Main File: The error: The solution here is that i can`t deconstruct the library from itself, and my mistake is that i needed to put only the intents that my bot needs. My solution: Answer You cannot deconstruct the library from itself. Either
Tag: discord.js
Trying to make discord bot but when i attempt to use ‘node .’ I get a client error
I am trying to create a discord bot and when i try to run “node .” in cmd after creating the code for the bot in visual studio code, I get an error message about the Client missing intents. Here is the error message. My code is as follows: (the ‘x’ are the bots clientID) Answer It’s a new issue
Discord.js music bot hosted on heroku crashes after couple minutes
I have a discord bot hosted on heroku which among it’s other functionalities, also provides members to listen to music (much like the famous Rythm bot). However, every time I play a song, the bot crashes and restarts itself after 7-10 of playing songs. This only seems to happen when I’m playing music. Other than that, the bot seems to
How to change this message to an code block message?
I want to change this part into a code block message I tried but it’s not working Here’s the full code Answer Since codeblocks have to be made with tripple `, you can just add them to the beginning and end like you normally do but escape them with a backslash so your normal string template doesnt end early:
Discord.js command handler aliases (discord.js v13)
i want to set a command handler aliases, but the bot is doesn’t response. in ping.js === How i can set? Answer You would want to make certain changes in your command handler as well! the suitable changes you need to make would be: Making it in your execute function so it can find and execute aliases too! Your definitions
Discord js v13 channel filter not working
I’m currently trying to get the total amount of text channels and voice channels to display in my embed, when I try to filter them as I did in discord.js v12 it gives me an output of 0 but if I use no filter and do guild.channels.cache.size, it prints 4 which is the correct amount ( 2 text channels, 1
Guild.commands is undefined in discord.js v12.5.3
So I’m using discord.js version 12.5.3 to rebuild a music bot I did a while back. I’m trying to use slash commands but when I use guild.commands.set([commands]) it says that guild.commands is undefined. Here’s that part of my code. Answer Guild.commands was only introduced in v13. In v12, the way to create slash commands is using commands.post(). This answer may
Catching an permission error problem discord.js?
I’m having an issue trying to catch an error. The error I’m wanting to catch is a 403 discord Missing Permission error. However instead of catching the error it’s causing my bot to go offline when the error occurs. Here is how I’m trying to catch my error. Help appreciated. Answer TextChannel.send() and GuildMemberManager.ban() return a Promise, which means that
Please fix the error: “TypeError: Cannot read property ‘id’ of undefined.”
I am trying to code a discord bot for a friend’s server. It’s supposed to be a fun bot so I thought it would be funny to add a spam command. But I keep getting Errors when I do. Can someone help me out with the error? The code and the error are both given below. It works fine when
Check role that is added guildmemberupdate discordjs
On the event guildmemberupdate, I am trying to see if the event is in my server and if the role is a certain role. If all things are true, it will send a message. It does not send a message though Here is the code It doesn’t send ‘test’ Answer The guildMemberUpdate event requires the server members intent. You can