Shasha/cmds/experiment/dropexp.js
2021-05-15 18:25:30 +00:00

22 lines
No EOL
671 B
JavaScript

'use strict';
const { trySend } = require("../../resources/functions");
const commando = require("@iceprod/discord.js-commando"),
{ database } = require("../../database/mongo"),
col = database.collection("Experiment");
module.exports = class dropexp extends commando.Command {
constructor(client) {
super(client, {
name: "dropexp",
memberName: "dropexp",
group: "experiment",
description: "description",
ownerOnly:true
});
}
run(msg, arg) {
col.drop().then(trySend(this.client, msg, "cleared")).catch(e => trySend(this.client, msg, `\`\`\`js\n${e.stack}\`\`\``));
}
};