Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/maybeanerd/MagiBot. MagiBot - the community building discord bot that adds joinsounds to your voice discord.gg/2Evcf4T
Something went wrong. Try again.
12345678910111213141516171819import { SlashCommandBuilder } from '@discordjs/builders';import { ChatInputCommandInteraction } from 'discord.js';import { MagibotSlashCommand } from '../types/command';
const slashCommand = new SlashCommandBuilder() .setName('ping') .setDescription('Returns the round trip time between you and MagiBot!') .setDMPermission(false);
export const ping: MagibotSlashCommand = { permissions: [], async run(interaction: ChatInputCommandInteraction) { const stop = new Date(); const diff = stop.getTime() - interaction.createdAt.getTime(); await interaction.reply(`Pong! \`(${diff}ms)\``); }, definition: slashCommand.toJSON(),};