f
This commit is contained in:
1 parent
a27bfb63e8
commit
670512944c
15 files changed
+33568
-43
No files matched your search
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
const { time } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: 'ping',
|
||||
description: `test the bot's latency to discord's servers and api`,
|
||||
aliases: ['pong'],
|
||||
usage: 'ping',
|
||||
|
||||
async execute(client, message) {
|
||||
const sent = await message.reply('pinging');
|
||||
const latency = sent.createdTimestamp - message.createdTimestamp;
|
||||
const apiLatency = Math.round(client.ws.ping);
|
||||
|
||||
const embed = {
|
||||
color: 0x8aa2b3,
|
||||
title: '',
|
||||
author: {
|
||||
name: message.author.username,
|
||||
icon_url: message.author.displayAvatarURL(),
|
||||
},
|
||||
description: 'fuck you!!!! 🖕',
|
||||
fields: [
|
||||
{ name: '# of cmds loaded', value: `**${client.commands.size}**`, inline: true },
|
||||
{ name: 'bot latency', value: `**${latency}ms**`, inline: true },
|
||||
{ name: 'api latency', value: `**${apiLatency}ms**`, inline: true },
|
||||
],
|
||||
footer: {
|
||||
text: `twitter @ ${message.guild.name}`,
|
||||
icon_url: client.user.displayAvatarURL(),
|
||||
},
|
||||
timestamp: new Date(),
|
||||
thumbnail: {
|
||||
url: client.user.displayAvatarURL(),
|
||||
height: 1024,
|
||||
width: 1024,
|
||||
},
|
||||
};
|
||||
|
||||
await sent.edit({ content: null, embeds: [embed] });
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user