Files
quarksBot/commands/ping.js
T
2022-08-01 14:18:05 -07:00

34 lines
1020 B
JavaScript

const { MessageEmbed } = require('discord.js');
module.exports = {
name: "ping",
debug: true,
description: "Test bot activity",
usage: "",
permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
member: [],
},
SlashCommand: {
options: [],
/**
*
* @param {require("../structures/QuarksBot")} client
* @param {import("discord.js").MessageCreate} message
* @param {string[]} args
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }, start) => {
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
return interaction.send(`You are not allowed to use the bot in this channel.`);
}
const end = new Date().getTime();
const pingEmbed = new MessageEmbed()
.setDescription(`🏓 **Pong!** Bot ping: ${end - start}ms`)
.setColor(client.config.EmbedColor);
return interaction.send({ embeds: [pingEmbed] });
},
},
}