Problem with buttons

I have this code, and most of the time (about 99%) it works without any problems. However, just a moment ago, the bot updated a message, and for some reason, there were no buttons. There is no error.

discord.js@14.16.1 NodeJS v18.20.4

  const guild = interaction.guild;

  await interaction.deferReply({ ephemeral: true });

  const memberId = interaction.options.getUser("użytkownik");

  let member;

  try {
      member = await guild.members.fetch(memberId);
  } catch (err) {
      return interaction.reply({
          embeds: [
              new discord.EmbedBuilder()
                  .setTitle("Głosowanie")
                  .setDescription(`${settings.emoji_wrong} Nie znaleziono użytkownika :(`)
                  .setColor(settings.color_fail)
          ]
      })
  }

  let poolMessage = await interaction.channel.send({
      embeds: [
          new discord.EmbedBuilder()
              .setTitle("Głosowanie")
              .setDescription(`${settings.emoji_exclamation} Tworzenie głosowania...`)
              .setColor(settings.color_orange)
      ]
  });

  await new poolSchema({ guildId: guild.id, channelId: interaction.channel.id, messageId: poolMessage.id, hostId: interaction.member.id, memberId: member.id, endTimestamp: Date.now() + 1000 * 60 * 2 }).save();

  const firstActionRow = new discord.ActionRowBuilder();
  const secondActionRow = new discord.ActionRowBuilder();

  for (let i = 1; i < 6; i++) {
      firstActionRow.addComponents(
          new discord.ButtonBuilder()
              .setCustomId(`glosowanie-${i}`)
              .setLabel(`${i}`)
              .setStyle(discord.ButtonStyle.Primary),
      )
  }

  for (let i = 6; i < 11; i++) {
      secondActionRow.addComponents(
          new discord.ButtonBuilder()
              .setCustomId(`glosowanie-${i}`)
              .setLabel(`${i}`)
              .setStyle(discord.ButtonStyle.Primary),
      )
  }

  await poolMessage.edit({
      embeds: [
          new discord.EmbedBuilder()
              .setTitle("Głosowanie")
              .setDescription(`${settings.emoji_correct} Głosowanie stworzone!\n\n` +
                  `Aby oddać swój głos na użytkownika <@${member.id}> wybierz poniższy przycisk z odpowiednią notą!\n\n` +
                  `Zebrane głosy: **0**\n` +
                  `Koniec głosowania <t:${((Date.now() + 1000 * 60 * 2) / 1000).toFixed(0)}:R>`
              )
              .setColor(settings.color_success)
      ],
      components: [
          firstActionRow, secondActionRow
      ]
  });

  await interaction.editReply({
      content: `${settings.emoji_correct} Głosowanie stworzone!`
  });
image.png
image.png
Was this page helpful?