forked from cosmic/scythe
1
0
Fork 0
scythe/src/commands/snipe.ts

18 lines
542 B
TypeScript

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}`);
}
}