I have tried this which is a copy of existing code from another one of my bots that works but when i run it i get a error saying “Intents is not defined” Error: Answer Simply, you should define the Intents by doing this: Edit: You dont need to use Discord on discord.js v13 since its not needed, instead do
Tag: discord.js
distube filters not applying
I’m trying to make a discord slash commands filter using distube but when I use the slash command it didn’t apply the filter that I picked but it sent the embed when filter is applied Node: v17.7.2 Discord: ^13.2.0 can someone help me or tell me why the filter is not applying to the current music in vc? thank you
How can I fetch Clash Of Clans API?
I’m trying to do a discord bot with the clash of clans api. But I get a weird error message. Thanks Error Message: Answer The API URL is api.clashofclans.com and you are also lacking an API KEY in your authorization header unless you removed it for security purposes Clash of Clans API uses JSON Web Tokens for authorizing the requests.
pinterest web scrape image
I’m trying to get a url from a pinterest image and send a url of it through the general profile of the user on pinterest, but it’s returning me undefined my code: Answer The problem is that the page is still loading. #mweb-unauth-container > div > div:nth-child(2) doesn’t exist, because #mweb-unauth-container > div only has one div child, and it’s
Faster and cleaner way to update Discord Message Embed with a MessageComponentInteraction collector
I’m trying to make a horse race command for my discord bot (TypeScript). The code itself works fine, but I have to update an embed which contains the race and the participants. The thing is that for it to properly update, I have to set its description every time that collector.on(“collect”) fires. I want to ask if there’s a better,
TypeError: Cannot read properties of undefined (reading ‘cache’) (discord.js)
This is the error I am facing: This is the my code that I run. Essentially the error given is not to do with my code itself. I’ve tried also reinstalling discord.js but still no luck. (I am using Discord v12) It works originally but every time throws that error so stops the whole thing. I was wondering if anyone
403 Error when setting application command permissions on Discord
My bot got a 403 error, even though it never happened before, and the code hasn’t changed at all. Trying to set fullPermissions gives me a 405 Error instead The paths /applications/{applicationId}/guilds/{guildId}/commands/{commandId}/permissions and /applications/{applicationId}/guilds/{guildId}/commands/permissions worked perfectly fine before, why wouldn’t they work now? Answer Discord has released Permissions V2 to all guilds yesterday (April 27, 2022). Bots can no longer
Delete Discord.js v13 slash command that doesnt exist
lately, I started working on a discord bot and added slash commands. I noticed that I have a ping(replies with pong) command that I didn’t create or I did and I can’t get rid of it. Here is my interactionHandler.js Is there a way to delete the command because I cant find a way. I was thinking of getting the
Can not access map
I get this error when I execute code ,I want to access server_queue playing TypeError: Cannot read properties of undefined (reading ‘playing’) This is my code: Answer After skipping your first if block when server_queue doesn’t exist, you are then trying to access playing on top of the nonexistent server_queue. Try adding and else if block instead of if to
Handling [object Promise] from noblox.js in discord.js
Surprisingly difficult to find this on google… So I’m making a discord bot with discord.js and connecting a noblox.js bot to it. Payout is commented because I do not want to yet, I am just trying to make messaging work. Output on discord when I type the !payout command: Answer You have to await the getUser as it’s an async