discord.js

Find the total of members online/offline Discord.js

故事扮演 提交于 2021-01-24 13:26:20
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

倾然丶 夕夏残阳落幕 提交于 2021-01-24 13:22:14
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

做~自己de王妃 提交于 2021-01-24 13:22:08
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

微笑、不失礼 提交于 2021-01-24 13:21:53
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

扶醉桌前 提交于 2021-01-24 13:21:30
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

一世执手 提交于 2021-01-24 13:19:52
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Discord.js V12 how can I show all members with a certain role?

旧街凉风 提交于 2021-01-24 12:22:22
问题 I am trying to make a command that will show me all the members with a certain role. The command should be like $rolelist and it shows all members' display names in a message that have the role TEST ROLE . Help me out if you can :D client.on('message', async message => { if (message.content.startsWith(prefix + "rolelist")) { const testRole = message.guild.roles.cache.find(role => role.name == "TEST ROLE"); const members = message.guild.members.filter(member => member.roles.find(testRole)).map

Can't reach members

房东的猫 提交于 2021-01-20 13:51:14
问题 this is my code for displaying members in a role. But when i call this command for a role that has a lot of members in, it only returns my name. How i can fix it? V12 let role; if(message.mentions.roles.first() || message.guild.roles.cache.get(args[0])) { role = message.mentions.roles.first() || message.guild.roles.cache.get(args[0]); if(!role) return message.reply("I can't find this role!"); } else { let choosenRole = args.slice(0).join(" "); if(!choosenRole) return message.reply("Please

Can't reach members

試著忘記壹切 提交于 2021-01-20 13:49:51
问题 this is my code for displaying members in a role. But when i call this command for a role that has a lot of members in, it only returns my name. How i can fix it? V12 let role; if(message.mentions.roles.first() || message.guild.roles.cache.get(args[0])) { role = message.mentions.roles.first() || message.guild.roles.cache.get(args[0]); if(!role) return message.reply("I can't find this role!"); } else { let choosenRole = args.slice(0).join(" "); if(!choosenRole) return message.reply("Please

Discord.js - How do you log role changes?

倾然丶 夕夏残阳落幕 提交于 2021-01-20 12:33:49
问题 I'm setting up server logs on my Discord bot on Discord.js v12.2.0 and I'm currently trying to set up role logging. I've rummaged around on the internet a bit and I can only find solutions for this on older versions of Discord.js, which obviously don't work on v12.2.0. I've set up the guildMemberUpdate event to log nickname changes, but I simply don't know how to do it for roles. It might just be super simple but I'm not sure how I would go about it. Here's my code so far: client.on(