Heyo, I want my bot to send a embed message to my private discord server when it joins & leaves a server. But the problem is that it does not send anything anywhere. My code looks like this: Answer Your code doesn’t activate upon joining the server. For that you have a nice event (that has a mislead…
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…
node.js – Check if word has an added/changed letter to a previous word
I’m working on a command for my Discord bot that allows for a game to be played, in which the goal is to post words that either change one letter in the previous word, or add a letter. I’m using this function: and it works fine if you change a letter, or add a letter to the end of the
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.jssrcclientCli…
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 mom…
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()…
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 St…
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 wa…
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…