Zalgo Command Added

This commit is contained in:
dragonfire535
2017-03-03 13:46:54 -05:00
parent 78c51272ee
commit 66c6c6df61
2 changed files with 28 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
const commando = require('discord.js-commando');
const zalgo = require('zalgolize');
class ZalgoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'zalgo',
group: 'textedit',
memberName: 'zalgo',
description: 'Zalgoizes Text (;zalgo This Text)',
examples: [';zalgo This Text']
});
}
async run(message, args) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
}
console.log("[Command] " + message.content);
let zalgoified = zalgo(message.content.split(" ").slice(1).join(" "));
message.channel.sendMessage(zalgoified);
}
}
module.exports = ZalgoCommand;