Création Repo pour mon bot Le Tamiseur

This commit is contained in:
Zachary Guénot
2023-04-23 19:30:04 +02:00
commit a879b38c3e
50 changed files with 7159 additions and 0 deletions

17
commands/global/update.js Executable file
View File

@@ -0,0 +1,17 @@
const { SlashCommandBuilder } = require('discord.js')
module.exports = {
data: new SlashCommandBuilder()
.setName('update')
.setDescription('Update the member count channel.'),
async execute(interaction) {
let guild = interaction.guild
guild.members.fetch().then(() => {
var i = 0
guild.members.cache.forEach(async member => { if (!member.user.bot) i++ })
let channel = guild.channels.cache.get('1091140609139560508')
channel.setName(`${i} Gens Posés`)
interaction.reply(`${i} Gens Posés !`)
}).catch(console.error)
}
}