Skip to content
Advertisement

Tag: discord.js

Kick command | discord.js

I’ve made a kick command for my bot, everything works fine but everyone can use it. I want that only people who have perms to use this command. Is there any solution to fix this problem? This is my code: Please help me! Thank you! Answer Use:

Change footer regarding on image in discord.js

When the image of an embed is randomized, is there a way to change the footer regarding on the image that is used in a message? I have tried if(images = “[link]”) embed.setFooter(“Hello!”) But then this footer is on every image, not just on one. Now three “=” because of the comment instead of 1 🙂 Complete code: Full code

Discord.js cannot read property id of undefined

so here’s the thing. I’ve done a bot with discord.js, it was working well and then it crashed. The reason I get is “guild.channels.set(channel.id, channel); ^ TypeError: Cannot read property ‘id’ of undefined” And this error seems to be in node_modulesdiscord.jssrcclientClientDataManager.js:81 But I just don’t know what to do, the bot can’t log and I didn’t change the main file

Create and assign role Discord.js

I’m creating a Discord bot with discord.js, but I don’t find how to create a role and assign it automatically. Example, a client writes: ?insc NAME @pseudo1 @pseudo2 @pseudo3 This command create the role NAME, then a category with channelVoice and channelText with access only for NAME. For the moment, this is my code. I have successfully created my category

Discord.js remove roles

I have this issue on my bot command. It doesn’t remove any other specified roles other than the first defined one. This is the part where everything is defined. Answer Your callback function for find() is incorrect, and actually find() returns the first found element in an array. You could use .filter() to get a collection of elements instead and

try…catch not work in JavaScript (Discord.js)

I’m working on a bot to fetch a user’s avatar, I use try…catch for user mention detection, but it still throws an error. And I tried a simple try…catch, and it throws an error SyntaxError: Identifier ‘x’ has already been declared: Here’s my code: IDE Using: Virtual Studio Code Version: 1.54.3 (user setup) Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T10:55:45.459Z Electron: 11.3.0 Chrome:

Discord.js error message on deleting Bot message

So basically I am lately always getting the following Error when I delete a message that my Bot sends. The message is not being used by the Bot anymore, but for some reason, it always crashes after deletion. Here is the Code for the command where it always has the problems with: As you see I never actually want to

Discord voice messaging plugin: getUserMedia() is not supported

Error: Failed to start MediaRecorder: Failed to execute ‘getUserMedia’ on “MediaDevices”: getUserMedia is not supported. Original: https://github.com/MKSx/Send-Audio-Plugin-BetterDiscord Error on line 1026. UPD: getUserMedia() disabled in discord, alternative:https://github.com/l-Nuril-l/Voice-Messages-Plugin-BetterDiscord UPD2: The alternative is dead Code with problem: Answer Intro Basically, better discord is essentially an application running in something like a chrome browser. You can validate this by hitting CTRL+SHIFT+I. The problem

Advertisement