galactic-bot/structure/client/components/commands/utility/TestStorage.js

33 lines
805 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', query: { 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;