Migrate eval command
This commit is contained in:
parent
c62488aa63
commit
acedbffdad
3 changed files with 33 additions and 25 deletions
|
@ -1,25 +0,0 @@
|
|||
const { command } = require('vylbot-core');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
class evaluate extends command {
|
||||
constructor() {
|
||||
super("evaluate");
|
||||
super.description = "Evaluates an expression";
|
||||
super.category = "Administration";
|
||||
super.requiredConfigs = "ownerid";
|
||||
}
|
||||
|
||||
evaluate(context) {
|
||||
if (context.message.author.id == context.client.config.eval.ownerid) {
|
||||
const result = eval(context.arguments.join(" "));
|
||||
|
||||
const embed = new MessageEmbed()
|
||||
.setDescription(result)
|
||||
.setColor(0x3050ba);
|
||||
|
||||
context.message.channel.send(embed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = evaluate;
|
Loading…
Add table
Add a link
Reference in a new issue