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

33 lines
805 B
JavaScript
Raw Normal View History

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) {
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;