Skip to content
Advertisement

Tag: discord.js

Discord.js: Add role to message sender

i am trying to make a discord.js bot that adds a role to a user when they type: +rolename . This is what I have come up with: When running the code i get the following error: TypeError: Cannot read property ‘add’ of undefined This doesn’t happen when I use this code and type +test @DiscordName#0001: My question is: How

Discord.js user isnt mentioned

I have a problem with sending messages when a user is tagged or not, I’m working on the pp command (as in dankmemer) but after adding the code so that I can tag a person the bot crashes, what I mean is that after tagging a person it will send a message in the title it will say the user’s

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 🙂

Discord.js reaction roles user uncertainty message

I want to make reaction roles, but I can’t get the uncertain information behind the content posted by the user.I have searched online many times, but I can’t find relevant information Below is my program My English is bad, please forgive me Answer There is a package called reaction-role. Here is the link: https://www.npmjs.com/package/reaction-role ReactionRole is a module that allows

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,

Advertisement