how could I make a member limit on a page? for example: only 10 members would appear on the first page, and to see the second page you would have to react with ⏩ Answer I would get the list of users as an array, then use slice to return a portion of the array. In your case I would
Tag: discord.js
Is there a current way to create a discord channel then select it later on?
Currently, I have been working on a Discord.js bot for a discord server I have. I want to make a command so that a user can open a ticket using !oticket and it will make a new channel that all of their dms to the bot will come through. I have working code for the channel creation, but when I
Discord.js Error – MaxListenersExceededWarning: Possible EventEmitter memory leak detected
Every time I try to make more than 10 commands I get the error: I tried fixing it by doing emitter.setMaxListeners() and it didn’t fix it so I searched online and tried to fix it by using process.setMaxListeners(0); but that didn’t work either. If there is a fix for this please let me know, and if you want to see
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.
activities of bot update informations
I put it in the status to show how many members are online of the total number, but it does not update the real number, only when the bot is restarted, is there any way that when this activity arrives, the information appears with the new data? Answer You need to regenerate the Strings in the Array every run:
How can I send a message to a specific channel by using my own “say” command in discord.js?
I tried to make a code like I write .say blabla” in another channel and It will delete my channel and send my message to “#general” but I can’t find a code to do this. Here is the code. Can you help me? Answer You are doing message.delete() first and then after that, you are doing message.content. In this case,
Kick command access to everyone
So the code below is my Kick.js but I want it so that the mod role can only use the kick command Answer Check for the message.member permissions If you want to check for specific role
My Discord bot does not respond to my messages
I am making a bot using Python. I am very new to coding with Python and I don’t understand a lot of things, I am just following a tutorial(https://youtu.be/j_sD9udZnCk) but I am stuck with my bot not responding to my messages. It goes online and offline as intented but it does not respond to my messages. Also it is an
JS- SyntaxError: Identifier ‘Client’ has already been declared [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question
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