Skip to content
Advertisement

Tag: discord.js

Discord.JS AwaitMessages

In the line of “message.channel.awaitmessages” i think the code is bad writted, the thing i want to do is to await for 1 message that is a number btw 0 and 23. Here is the corresponding code : Answer You need to update your filter for this to work: Additionally the .then() needs a collected too. It would also be

How can I send an code block in discord.js embed?

I am trying to send an embed with a codeblock. In discord a code block is set with three ` What can I do to put oldMessage.cleanContent and newMessage.cleanContent in a code block? Here is my code: Answer You can do it in two ways both are correct: You just comment the comma with quotation Or you can comment it

Discord bot get number of users in all channels

Im not good with javascript but i have been trying to get count number of users in all voice channels. For example: if 2 users in ‘voice channel 1’ and 1 user in ‘voice channel 2’ I want to print number 3 in console which is all users in voice channels. This code print all members(online/offline) name in console, But

How to create a role with discord.js

I’ve been trying to make a discord bot using discord.js, but I can’t seem to find any documentation on how to create a role that works in 2018. All the ones I can find that work, no longer work as they have removed the referenced function. In https://discord.js.org/#/docs/main/stable/class/Role there is no mention of a createRole(“role”, “roleName”); type function. If anyone

Advertisement