Konpeki-Discord-Bot/commands/ping.js

17 lines
595 B
JavaScript
Raw Normal View History

2022-12-15 13:07:35 -06:00
/*
* Konpeki Discord Bot - Slash Command Definition File
2022-12-15 13:07:35 -06:00
* ping.js - A simple ping function
*
* Function modified from https://discordjs.guide/creating-your-bot/slash-commands.html
*/
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
2023-09-13 01:17:31 -05:00
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Checks to see if the bot is online, as well as it\'s ping'),
async execute(interaction) {
await interaction.reply({ content: `Pong! Current Websocket Heartbeat / ping is ${interaction.client.ws.ping}ms.`, ephemeral: true });
},
2022-12-15 13:07:35 -06:00
};