The problem that I have is with the case “ban”. When I go “+ban” and then mention the user, it works. The user is banned and the message is sent but then it exits with a message error about the Discord API and permission, even though I have admin permission for the bot. And when I don’t mention anyone, it
Tag: discord.js
How do I make my command not mention the user?
I just started coding my Discord bot and I made a command that replies to every message that isn’t sent by a bot. When I tried it in DMs it works fine, but when I tried it in my server it would mention the user before the command. In the DM it would say just “test”, but in the server
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 user roles are undefined TypeError: Cannot read property ‘cache’ of undefined
I added this new command in my bot, when members execute the command ;;time, the bot goes through the roles and gives them the claim time. I have given my code along with the error. Any possible solution to fix the error? And here is the error : I searched on google and stack overflow for answers but couldn’t find
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
How do I check if a discord.js bot is inside the same voice channel as the member? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. This post was edited and submitted for review last month and failed to reopen the post: Original close reason(s) were not resolved Improve this question The problem: I
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 🙂
DiscordJS ticketinfo TypeError: results.transcripts is not iterable
I’m making a ticketinfo command that get’s information about a ticket that’s in my database. I’m trying to catch the information from the database and put in into my embed. The embed is being send to the user that runs that command. It seems to not work. Why isnt it working? My Code: Error: Answer It seems, that result.transcripts either
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,