Basic Bot setup

This commit is contained in:
2024-04-07 12:11:59 +02:00
commit c2d634d049
21 changed files with 1298 additions and 0 deletions

19
src/commands/misc/ping.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Client, CommandInteraction } from "discord.js"
import CommandInterface from "../../utils/commandInterface";
const command: CommandInterface = {
name: "ping",
description: "Lasse die den Ping vom Bot anzeigen!",
callback: async (client: Client<true>, interaction: CommandInteraction) => {
await interaction.deferReply();
const reply = await interaction.fetchReply();
const ping = reply.createdTimestamp - interaction.createdTimestamp;
interaction.editReply(`Pong! Client ${ping}ms | Websocket: ${client.ws.ping}`);
}
}
export = command;