mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
The Ultimate Formatting is Done
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class BinaryCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToBinary = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class CowsayCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (!message.content.split(" ").slice(1).join(" ")) {
|
||||
message.channel.send(":x: Error! You entered nothing!");
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class EmbedCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let embedMessage = message.content.split(" ").slice(1).join(" ");
|
||||
if (!embedMessage) {
|
||||
message.channel.send(":x: Error! Nothing to embed!");
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class MorseCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let [methodToUse] = message.content.toLowerCase().split(" ").slice(1);
|
||||
let toMorse = message.content.split(" ").slice(2).join(" ");
|
||||
if (!toMorse) {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class PirateCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToPirate = message.content.split(" ").slice(1).join(" ");
|
||||
let pirate = pirateSpeak.translate(turnToPirate);
|
||||
if (!turnToPirate) {
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class ReverseCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let stringToReverse = message.content.split(" ").slice(1).join(" ");
|
||||
if (!stringToReverse) {
|
||||
message.channel.send(":x: Error! Nothing to reverse!");
|
||||
|
||||
@@ -23,7 +23,7 @@ module.exports = class RinSayCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let rinContent = message.content.split(" ").slice(1).join(" ");
|
||||
request
|
||||
.post(config.webhook)
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class RomajiCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let romajify = message.content.split(" ").slice(1).join(" ");
|
||||
if (hepburn.containsKana(romajify)) {
|
||||
let romajified = hepburn.fromKana(romajify);
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = class SayCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let copycat = message.content.split(" ").slice(1).join(" ");
|
||||
if (!copycat) {
|
||||
message.channel.send(":x: Error! Nothing to say!");
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class ShuffleCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToShuffle = message.content.split(" ").slice(1).join(" ");
|
||||
if (!thingToShuffle) {
|
||||
message.channel.send(":x: Error! Nothing to shuffle!");
|
||||
|
||||
@@ -190,7 +190,7 @@ module.exports = class TemmieCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToTranslate = message.content.split(" ").slice(1).join(" ");
|
||||
if (!thingToTranslate) {
|
||||
message.channel.send(':x: Error! Nothing to translate!');
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let [languageto] = message.content.toLowerCase().split(" ").slice(1);
|
||||
let thingToTranslate = message.content.split(" ").slice(2).join(" ");
|
||||
if (languageto === "list") {
|
||||
@@ -38,9 +38,9 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
let languagefrom = res.from.language.iso.toLowerCase();
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.addField('Input (From: ' + languages.entries[languagefrom] + '):',
|
||||
.addField(`Input (From: ${languages.entries[languagefrom]}):`,
|
||||
thingToTranslate)
|
||||
.addField('Translation (To: ' + languages.entries[languageto] + '):',
|
||||
.addField(`Translation (To: ${languages.entries[languageto]}):`,
|
||||
res.text);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(err => {
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class YodaCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToYoda = message.content.split(" ").slice(1).join(" ");
|
||||
if (!turnToYoda) {
|
||||
message.channel.send(':x: Error! Nothing to translate!');
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class ZalgoCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let zalgoified = zalgo(message.content.split(" ").slice(1).join(" "));
|
||||
if (!zalgoified) {
|
||||
message.channel.send(":x: Error! Nothing to zalgoify!");
|
||||
|
||||
Reference in New Issue
Block a user