forked from cosmic/scythe
20 lines
646 B
TypeScript
20 lines
646 B
TypeScript
import type { CommandInteraction, TextChannel } from "discord.js";
|
|
import { Discord, Slash } from "discordx";
|
|
|
|
@Discord()
|
|
export class UptimeCmd {
|
|
@Slash({ name: "uptime-setup", description: "set up uptime cmd" })
|
|
async uptimeCmd(inter: CommandInteraction) {
|
|
if (inter.user.id != Bun.env.OWNER) {
|
|
await inter.reply("you cannot run this command :p");
|
|
return;
|
|
}
|
|
const channel = inter.client.channels.cache.get(
|
|
Bun.env.SCYTHE_CHANNEL,
|
|
) as TextChannel;
|
|
await channel.send(
|
|
`bot is up, last ping: <t:${Math.floor(Date.now()/1000)}:f> | if the ping was more than 1 minute ago, cosmic needs to check the bot lol :3`,
|
|
);
|
|
}
|
|
}
|