From 527aad0e075501811f50bb4e8b83cb12dd07e6ba Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sun, 3 Jul 2022 19:14:37 -0700 Subject: [PATCH] add ping command --- commands/ping.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 commands/ping.js diff --git a/commands/ping.js b/commands/ping.js new file mode 100644 index 0000000..9491686 --- /dev/null +++ b/commands/ping.js @@ -0,0 +1,27 @@ +const { MessageEmbed } = require('discord.js'); + +module.exports = { + name: "ping", + 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 }) => { + if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { + return interaction.send(`You are not allowed to use the bot in this channel.`); + } + return interaction.send('Pong!'); + }, + }, +} \ No newline at end of file