fix /boosters

This commit is contained in:
Jonny_Bro (Nikita) 2024-07-10 22:26:38 +05:00
parent e50c36a967
commit e079b035b9
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -124,7 +124,7 @@ class Boosters extends BaseCommand {
const boosters = (await interaction.guild.members.fetch()).filter(m => m.premiumSince); const boosters = (await interaction.guild.members.fetch()).filter(m => m.premiumSince);
if (boosters.size === 0) return interaction.error("general/boosters:NO_BOOSTERS", null, { edit: true }); if (boosters.size === 0) return interaction.error("general/boosters:NO_BOOSTERS", null, { edit: true });
const embeds = generateBoostersEmbeds(client, interaction, boosters); const embeds = generateBoostersEmbeds(interaction, boosters);
const row = new ActionRowBuilder().addComponents( const row = new ActionRowBuilder().addComponents(
new ButtonBuilder().setCustomId("boosters_prev_page").setStyle(ButtonStyle.Primary).setEmoji("⬅️"), new ButtonBuilder().setCustomId("boosters_prev_page").setStyle(ButtonStyle.Primary).setEmoji("⬅️"),
@ -159,7 +159,7 @@ function generateBoostersEmbeds(interaction, boosters) {
let j = i; let j = i;
k += 10; k += 10;
const info = current.map(member => `${++j}. ${member.toString()} | ${interaction.translate("general/boosters:BOOSTER_SINCE")}: **${Math.floor(new Date(member.premiumSince).getTime() / 1000)}**`).join("\n"); const info = current.map(member => `${++j}. ${member.toString()} | ${interaction.translate("general/boosters:BOOSTER_SINCE")}: <t:${member.premiumSince}:f>`).join("\n");
const embed = interaction.client.embed({ const embed = interaction.client.embed({
title: interaction.translate("general/boosters:BOOSTERS_LIST"), title: interaction.translate("general/boosters:BOOSTERS_LIST"),