how would I rerun a command thru a button

I wanna re-run a command using a "Continue" button
public async run(interaction: ButtonInteraction) {
if (interaction.inCachedGuild()) {
const voiceChannel = interaction.member.voice
if (voiceChannel.channelId) {
const voiceChannel = await interaction.member.voice.channel?.createInvite()
interaction.reply(
`${game} ${tags.map((tag) => tag)}\n\n\n${message.author} is inviting you to a game ${
voiceChannel?.url
}\n\n\n**${msg}**`
)
}
}
public async run(interaction: ButtonInteraction) {
if (interaction.inCachedGuild()) {
const voiceChannel = interaction.member.voice
if (voiceChannel.channelId) {
const voiceChannel = await interaction.member.voice.channel?.createInvite()
interaction.reply(
`${game} ${tags.map((tag) => tag)}\n\n\n${message.author} is inviting you to a game ${
voiceChannel?.url
}\n\n\n**${msg}**`
)
}
}
I tried to simply mimic the command but I am not sure if I can somehow pass the args or something
0 Replies
No replies yetBe the first to reply to this messageJoin