import type { CommandInteraction } from "discord.js"; import { Discord, Slash } from "discordx"; import { snipeObject } from ".."; @Discord() export class SnipeCmd { @Slash({ name: "snipe", description: "snipe the latest deleted message" }) async snipe(inter: CommandInteraction) { if (!snipeObject || (!snipeObject.author && !snipeObject.content)) { return await inter.reply({ content: "no sniped message in cache!", ephemeral: true, }); } await inter.reply(`${snipeObject.author} said: ${snipeObject.content}`); } }