2020-04-14 17:05:56 +02:00
|
|
|
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) {
|
|
|
|
|
2020-04-16 14:37:04 +02:00
|
|
|
const time1 = new Date().getTime();
|
|
|
|
let response = await this.client.transactionHandler._send({ provider: 'mongodb', query: { collection: 'infractions', type: 'find', query: { case: 1 } } }).catch(err => { return err; });
|
|
|
|
const time2 = new Date().getTime();
|
|
|
|
console.log(time2-time1);
|
2020-04-14 17:05:56 +02:00
|
|
|
|
|
|
|
message.reply(JSON.stringify(response));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = PingCommand;
|