mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-09 14:23:08 +02:00
537f59d496
logger stuff
31 lines
843 B
JavaScript
31 lines
843 B
JavaScript
const Discord = require('discord.js');
|
|
const config = require('../config.json');
|
|
const log = require(`../handlers/logger.js`);
|
|
module.exports = {
|
|
name: 'ping',
|
|
description: 'Calculate latency',
|
|
usage: '',
|
|
aliases: ['none'],
|
|
example: '',
|
|
args: false,
|
|
cooldown: config.cooldown,
|
|
guildOnly: true,
|
|
execute(message, args) {
|
|
const client = message.client;
|
|
// command starts here
|
|
message.delete();
|
|
const embed = new Discord.RichEmbed()
|
|
.setAuthor(`${client.user.username} / Pong!`, client.user.avatarURL)
|
|
.setColor(config.colour)
|
|
.setTimestamp()
|
|
.addField("API Latency", `${Math.round(message.client.ping)}ms`, true)
|
|
.setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
|
|
message.channel.send({embed})
|
|
|
|
|
|
|
|
|
|
// command ends here
|
|
},
|
|
};
|