Skip to content
Advertisement

Tag: discord

Discord Nickname Command with a specific format

I am relatively new to coding. I already coded a bot with a “nickname changer”. My problem is, that I want it to change to a specific format: “!nick @JohnDoe John” changes name to “JohnDoe [John]” It is for a private server, where everyone can see the users Gametag and their real name. Thanks in advance for your help 🙂

Why can’t it locate the directory?

Was cooding a command handler in discord.js but ran into some trouble along the way, from my limited knowledge in javascript and discord.js the code should at least be able to find the directory. Said code that’s causing the headache: Answer The path passed to fs.readdirSync() is interpreted as relative to the current working directory, not to the JS file,

how can i move users with reaction

im trying to create bot that move users when they react in message create channel and move the user to the channel that was created , err = Cannot read property ‘setChannel’ of undefined Answer You need a GuildMember to access their voice state. Your mem variable is wrong so, you need to get the member instead.

How to fix code not moving channel under category

The code created category and channel and gave me this error: TypeError: Cannot read property ‘hasOwnProperty’ of undefined without moving the channel in the category This is the code to the error: Answer The channel.setParent call fails on this line since category is undefined. Looks like the guild does not have a category channel named ‘Tickets’. Since you’re creating the

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

Advertisement