I can’t seem to empty all my channels of their messages … Here is my code: Do you have any idea to solve my problem? Solution : Thank you Answer client doesn’t have a guild property. This returns undefined which then gives you that error. Perhaps you meant message.guild? message would be any Discord.Message, either from a parameter, fetched from
Tag: discord
Timed Mute Command ‘UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role’ error
I’m making a timed mute command, but i get a lot of errors, the principal one being : Here is the bugged code : The problem comes from the fact that I get all roles from the user, store it and then give it back. I don’t know if there is any other way to do it but that’s what
How to make an discord js bot to send an random message(i make an list and he sends it) at some time in an exact text channel from discord
This is how an comand works And this is my main.js an little help please?i really need it and i would apreciatte much if you would help me Answer First of all you need to find the channel ID. Best to go into the Discord app and right click the channel and select “Copy ID”. It should look something like
Can I randomize message replies? (Discord.js)
What I am trying to do is randomize messages, i don’t know how though. I’ve been using the code: I’m wondering if it is possible to make it send random replies when a command is executed on Discord. Answer You can defined list of answer in array and random of one those answer Ex:
Clear all messages that are not images or links by using discord.js and Node.js [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I have a bot in discord in JavaScript and I need to start a timer in 24 hours and clear
how do i filter a data in quickmongoi so that it would show only names of users who are in the guild only in the leaderboard command
js and quickmongo for a leaderboard command but it shows the named of all the users in the database and I want it to show names of users who are in the guild only. Any help is highly appreciated 🙏. I tried filtering it too… My current code Help me please Answer Array#filter() doesn’t modify arrays in place, it only
Discord Bot unexpectedly exits with error when successfully banning someone
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
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.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