v14 Slash Butonlu Ping Komutu

valensica

Sudan Çıkmış
Mesajlar
5
En iyi cevaplar
0
Beğeniler
0
Puanları
10
Ruh hali
v14 Slash Butonlu Ping Komutu Paylaştım Bugün Umarım Begenirsiniz

JavaScript:
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js');
module.exports = {
  name: "ping",
  description: "Botun pingini görürsün!",
  type: 1,
  options: [],

  run: async(client, interaction, message) => {

    const { guildId, channel } = interaction;

    
    const row = new ActionRowBuilder()             
    .addComponents(                 
      new ButtonBuilder()                     
      .setCustomId('primary')                     
      .setLabel(`yenile`)                     
      .setStyle(2),

      );         
      const user = interaction.options.getMember('user')

          const embed = new EmbedBuilder()
          .setDescription(`Bot anlık ping: ${client.ws.ping} ms`)
          .setFooter({text:`Valensica Was Here`})
          await interaction.reply({ embeds: [embed], components: [row] });
const filter = i => i.customId === 'primary' && i.member.id === interaction.member.id;

const collector =  interaction.channel.createMessageComponentCollector({ filter, max: 2, time: 30000 })
collector.on('collect', async i => {

 const embed = new EmbedBuilder()
     .setDescription(`Bot anlık ping: ${client.ws.ping} ms`)
     .setFooter({text:`Valensica Was Here`})


  await i.update({ embeds: [embed], components: [row] });
await i.editReply()
});

            
 

collector.on('end', collected =>
  row.components.forEach(c => c.setDisabled(true)))
  }
}

Herhangi Bir İhtiyacınız Olursa İletişim Bilgilerim Aşagıda

Discord Nick : Shénz☨#1911
 



Üst