So I wrote a “test” command and wanted to make it in a way where when people type -test, the upper cases and lower cases don’t matter. The command should work with -test, -Test, -TEST, etc. Currently, the command only works with -test and no upper cases. I also tried changing it from toLowerCase(); to toUpperCase(); and the (command ===
Tag: discord.js
How to respond with embeds
Currently I am trying to work on my bot and update its responses. Right now I am trying to use the code below to make it respond with the random embeds I made. For some reason when doing using this code the bot either responds with “NaN” or “3”? Answer The purpose of: Is to generate a pseudo-random integer between
How to make a timed bool in discord.js
I want my bot to reply “Good morning” whenever someone says “good morning”, for example. I’ve got all that figured out, but now I wanted to put a timer onto it and it is getting a bit more complicated. I want the timer to be for absolutely everyone on the server. If anyone says good morning then let’s make the
Small discord.js Avatar image
Avatar issue example I am trying to do the discord.js avatar command and it works. It sends the image it needs to send but the issue is that the image sent is small compared to other bots. Am using the command handler in the discord.js guide Answer You can add a size option like how you did with you format
!createcategory | doesn’t create category | What to do? Discord.js
The code used to work, but somehow I forgot what I did with it and didn’t code for 2 months or so… The function should be – when you write !createcategory it should create a category with voice and text channels in it. The category should be named by your user name. There is no error in the console, please
role overwrites when creating a role discord.js
When my bot joins a new guild it creates a role & sets overwrites. I have 2 questions: Is it possible to move this role to the top of the list or at least somewhere close? How would I go on displaying this role separately from online members? Answer To display a role separately from online members, you can use
Is there a way to add tooltip to text in a Discord bot message?
It’s the first time I’m writing a Discord bot, decided to go with the Discord.js module. One of my goals involved adding tooltips to certain words in a sentence so that the user can mouseover the word and get additional information. The only idea I had after searching for an hour was using an embed message and using markdown to
Discord.js restart command is not working (returns undefined error)
I am making a bot with discord.js and my restart command is not working. By not working I mean, I get this error: My code is: If you can, please help Answer Try this: .then() takes a function as argument, so you have to wrap the actions into a function.
How do I make sure that the person has a certain item from the shop?
I’ve had this problem for hours where I can’t make sure that people have bought a pet before doing activities with it. It doesn’t show an error but it doesn’t work properly and I don’t know how to reference a certain item in a player’s inventory because I’m trying to implement a pet feature where you can fight pets with
Is there a difference between GuildMemberManager.resolve() and Guild.member() in discord.js?
Guild.member() returns the GuildMember form of a User object, if the user is present in the guild. It takes a UserResolvable as a parameter (user ID or object). GuildMemberManager resolves a GuildMemberResolvable to a GuildMember object. What confused me is that a GuildMemberResolvable can be either a GuildMember object or a UserResolvable. First of all, why would anybody need to