This commit is contained in:
Daniel Odendahl Jr
2017-04-30 22:56:59 +00:00
parent 83e990ae1c
commit 877f720cfc
105 changed files with 460 additions and 461 deletions
+3 -4
View File
@@ -1,10 +1,9 @@
const { Command } = require('discord.js-commando');
const binary = (str) => {
const pad = '00000000';
return unescape(encodeURIComponent(str))
.split('').map(str => {
const binary = str.charCodeAt(0).toString(2);
return `${pad.slice(binary.length)}${binary}`;
return `${'00000000'.slice(binary.length)}${binary}`;
}).join('');
};
@@ -29,8 +28,8 @@ module.exports = class BinaryCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(text);
return msg.say(text);
}
};
+2 -2
View File
@@ -20,8 +20,8 @@ module.exports = class CowsayCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`);
return msg.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`);
}
};
+6 -6
View File
@@ -16,16 +16,16 @@ module.exports = class EmbedCommand extends Command {
});
}
run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
return message.say('This Command requires the `Embed Links` Permission.');
run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { text } = args;
const embed = new RichEmbed()
.setAuthor(message.author.username, message.author.displayAvatarURL)
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
.setColor(0x00AE86)
.setTimestamp()
.setDescription(text);
return message.embed(embed);
return msg.embed(embed);
}
};
+2 -2
View File
@@ -23,8 +23,8 @@ module.exports = class MorseCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(text);
return msg.say(text);
}
};
+2 -2
View File
@@ -23,8 +23,8 @@ module.exports = class PirateCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(`\u180E${text}`);
return msg.say(`\u180E${text}`);
}
};
+2 -2
View File
@@ -16,8 +16,8 @@ module.exports = class ReverseCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(`\u180E${text}`);
return msg.say(`\u180E${text}`);
}
};
+5 -5
View File
@@ -21,11 +21,11 @@ module.exports = class SayCommand extends Command {
});
}
run(message, args) {
if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return message.say('This Command requires the `Manage Messages` Permission.');
run(msg, args) {
if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return msg.say('This Command requires the `Manage Messages` Permission.');
const { text } = args;
message.delete();
return message.say(`\u180E${text}`);
msg.delete();
return msg.say(`\u180E${text}`);
}
};
+2 -2
View File
@@ -23,8 +23,8 @@ module.exports = class TemmieCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(`\u180E${text}`);
return msg.say(`\u180E${text}`);
}
};
+2 -2
View File
@@ -21,8 +21,8 @@ module.exports = class UpsideDownCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(text);
return msg.say(text);
}
};
+5 -5
View File
@@ -25,12 +25,12 @@ module.exports = class WebhookCommand extends Command {
return this.client.isOwner(msg.author);
}
async run(message, args) {
if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return message.say('This Command requires the `Manage Messages` Permission.');
async run(msg, args) {
if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return msg.say('This Command requires the `Manage Messages` Permission.');
const { text } = args;
try {
message.delete();
msg.delete();
await request
.post(process.env.WEBHOOK_URL)
.send({
@@ -38,7 +38,7 @@ module.exports = class WebhookCommand extends Command {
});
return null;
} catch (err) {
return message.say('An Unknown Error Occurred.');
return msg.say('An Unknown Error Occurred.');
}
}
};
+2 -2
View File
@@ -23,8 +23,8 @@ module.exports = class ZalgoCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { text } = args;
return message.say(`\u180E${text}`);
return msg.say(`\u180E${text}`);
}
};