Oye, estoy tratando de hacer un comando de barra que genere fotos aleatorias con el botón.
por lo tanto, cuando un usuario use el comando, enviará una inserción con el botón y luego el botón cuando un usuario haga clic en eso, la inserción se editará y cargará otra imagen
pero parece que lo estaba haciendo mal..
Nodo: v17.7.2
Discordia.js: 13.2.0
aquí está mi código
const { MessageEmbed, MessageActionRow, MessageButton } = require('discord.js'); const superagent = require('superagent'); const ee = require("../../config.json"); module.exports = { name: 'waifu', description: 'Give you a random anime waifus pics', run: async (client, interaction, args) => { let { body } = await superagent.get(`https://api.waifu.pics/sfw/waifu`); const msg = await interaction.followUp({ embeds: [ new MessageEmbed() .setColor(ee.color) .setTitle("Waifu 😳") .setImage(body.url) .setTimestamp() ], components: [ new MessageActionRow() .addComponents( new MessageButton() .setCustomId('nextWaifu') .setLabel('More Waifu') .setStyle('SUCCESS') ) ], fetchReply: true }); let embed = msg.embeds embed.color = ee.color; embed.image = body.url; let components = msg.components return msg.edit({ embeds: [embed], components: [components], fetchReply: true }); } }