2022-07-26 17:20:10 +05:00
|
|
|
const BaseCommand = require("../../base/BaseCommand");
|
2022-07-23 17:14:42 +05:00
|
|
|
|
|
|
|
class Repeat extends BaseCommand {
|
|
|
|
/**
|
|
|
|
*
|
2022-07-26 17:20:10 +05:00
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
command: {
|
|
|
|
name: "repeat", // Application command name.
|
2022-07-25 22:09:02 +05:00
|
|
|
type: 3 // Type 3 is MESSAGE COMMAND.
|
2022-07-23 17:14:42 +05:00
|
|
|
},
|
|
|
|
aliases: ["r"], // Application command aliases.
|
2022-07-26 17:20:10 +05:00
|
|
|
dirname: __dirname,
|
2022-07-23 17:14:42 +05:00
|
|
|
guildOnly: true // Determines whether your command is only guild.
|
|
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
2022-07-26 17:20:10 +05:00
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
*/
|
|
|
|
async onLoad() {
|
|
|
|
//...
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
2022-07-26 17:20:10 +05:00
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
* @param {import("discord.js").ContextMenuInteraction} interaction
|
|
|
|
*/
|
|
|
|
async execute(client, interaction) {
|
|
|
|
const targetChannel = interaction.member.guild.channels.cache.get(interaction.channelId);
|
|
|
|
const targetMessage = await targetChannel.messages.fetch(interaction.targetId);
|
|
|
|
return interaction.reply({ content: targetMessage.content, ephemeral: false, fetchReply: true }).then(m => setTimeout(() => m.delete(), 5000));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = Repeat;
|