forked from Galactic/galactic-bot
33 lines
807 B
JavaScript
33 lines
807 B
JavaScript
const { Command } = require('../../../../interfaces/');
|
|
|
|
class PingCommand extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
name: 'test',
|
|
module: 'utility',
|
|
description: "Determines the ping of the bot.",
|
|
arguments: [
|
|
|
|
]
|
|
});
|
|
|
|
this.client = client;
|
|
|
|
|
|
}
|
|
|
|
async execute(message) {
|
|
|
|
const time1 = new Date().getTime();
|
|
let response = await this.client.transactionHandler._send({ provider: 'mongodb', request: { collection: 'infractions', type: 'find', query: { case: 1 } } }).catch(err => { return err; });
|
|
const time2 = new Date().getTime();
|
|
console.log(time2-time1);
|
|
|
|
message.reply(JSON.stringify(response));
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = PingCommand; |