Réécriture complète 4.0
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s

This commit is contained in:
2025-06-09 16:29:12 +02:00
parent f2c6388da6
commit ddd617317c
133 changed files with 8092 additions and 4332 deletions

View File

@@ -1,19 +1,22 @@
import { SlashCommandBuilder, ChatInputCommandInteraction, Guild } from 'discord.js'
export default {
data: new SlashCommandBuilder()
.setName('update')
.setDescription('Update the member count channel.'),
async execute(interaction: ChatInputCommandInteraction) {
let guild = interaction.guild as Guild
guild.members.fetch().then(() => {
let i = 0
guild.members.cache.forEach(async member => { if (!member.user.bot) i++ })
let channel = guild.channels.cache.get('1091140609139560508')
if (!channel) return
channel.setName(`${i} Gens Posés`)
interaction.reply(`${i} Gens Posés !`)
}).catch(console.error)
}
}
import { SlashCommandBuilder, MessageFlags } from "discord.js"
import type { ChatInputCommandInteraction } from "discord.js"
import { t } from "@/utils/i18n"
export const data = new SlashCommandBuilder()
.setName("update")
.setDescription("Update the member count channel")
.setDescriptionLocalizations({ fr: "Mettre à jour le canal de nombre de membres" })
export async function execute(interaction: ChatInputCommandInteraction) {
const guild = interaction.guild
if (!guild) return interaction.reply({ content: t(interaction.locale, "common.command_server_only"), flags: MessageFlags.Ephemeral })
guild.members.fetch().then(async () => {
let i = 0
guild.members.cache.forEach(member => { if (!member.user.bot) i++ })
const channel = guild.channels.cache.get("1091140609139560508")
if (!channel) return
await channel.setName(`${i} Gens Posés`)
return interaction.reply(t(interaction.locale, "salonpostam.update.members_updated", { count: i }))
}).catch(console.error)
}