// SupportBot // Command: Ping const Discord = require("discord.js"); const bot = new Discord.Client() bot.settings = require("../settings.json"); exports.run = (bot, message, args) => { message.delete(); const embed = new Discord.RichEmbed() .setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `) .setColor(bot.settings.colour) message.channel.send(embed).catch(console.error); console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`) const CMDLog = new Discord.RichEmbed() .setTitle(bot.settings.Commands_Log_Title) .addField(`User`, `<@${message.author.id}>`) .addField(`Command`, bot.settings.Ping_Command, true) .addField(`Channel`, message.channel, true) .addField(`Executed At`, message.createdAt, true) .setColor(bot.settings.colour) .setFooter(bot.settings.footer) let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`); if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```); CommandLog.send(CMDLog); } exports.help = { name: bot.settings.Ping_Command, }