mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
say, embed, and code
This commit is contained in:
@@ -30,6 +30,6 @@ module.exports = class BinaryCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToBinary = args.text;
|
||||
let binaryText = stringToBinary(turnToBinary);
|
||||
return message.channel.send(binaryText);
|
||||
return message.say(binaryText);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,10 +23,10 @@ module.exports = class CowsayCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToCowsay = args.text;
|
||||
return message.channel.sendCode(null, cowsay.say({
|
||||
return message.code(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
e: "oO",
|
||||
T: "U "
|
||||
})).catch(error => message.channel.send(':x: Error! Perhaps the content is too long?'));
|
||||
})).catch(error => message.say(':x: Error! Perhaps the content is too long?'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = class EmbedCommand extends commando.Command {
|
||||
.setTimestamp()
|
||||
.setDescription(embedMessage);
|
||||
let deleteMsg = await message.delete();
|
||||
let embedSend = await message.channel.sendEmbed(embed);
|
||||
let embedSend = await message.embed(embed);
|
||||
return [deleteMsg, embedSend];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -38,10 +38,10 @@ module.exports = class MorseCommand extends commando.Command {
|
||||
let methodToUse = args.method.toLowerCase();
|
||||
let toMorse = args.text;
|
||||
if (methodToUse === 'encode') {
|
||||
return message.channel.send(morse.encode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
return message.say(morse.encode(toMorse)).catch(error => message.say(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
else if (methodToUse === 'decode') {
|
||||
return message.channel.send(morse.decode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
return message.say(morse.decode(toMorse)).catch(error => message.say(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class PirateCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToPirate = args.text;
|
||||
let pirate = pirateSpeak.translate(turnToPirate);
|
||||
if (pirate.length > 1950) return message.channel.send(":x: Error! Your message is too long!");
|
||||
return message.channel.send(pirate);
|
||||
if (pirate.length > 1950) return message.say(":x: Error! Your message is too long!");
|
||||
return message.say(pirate);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,6 +23,6 @@ module.exports = class ReverseCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let stringToReverse = args.text;
|
||||
let reversed = stringToReverse.split("").reverse().join("");
|
||||
return message.channel.send(reversed);
|
||||
return message.say(reversed);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class RinSayCommand extends commando.Command {
|
||||
return [post, deleteMsg];
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(':x: Error! Message failed to send!');
|
||||
return message.say(':x: Error! Message failed to send!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,6 +36,6 @@ module.exports = class RomajiCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let romajify = args.kana;
|
||||
let romajified = hepburn.fromKana(romajify);
|
||||
return message.channel.send(romajified);
|
||||
return message.say(romajified);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = class SayCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let copycat = args.text;
|
||||
let deleteMsg = await message.delete();
|
||||
let copyMsg = await message.channel.send(copycat);
|
||||
let copyMsg = await message.say(copycat);
|
||||
return [deleteMsg, copyMsg];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,6 +34,6 @@ module.exports = class ShuffleCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToShuffle = args.text;
|
||||
return message.channel.send(thingToShuffle.shuffle());
|
||||
return message.say(thingToShuffle.shuffle());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -315,6 +315,6 @@ module.exports = class TemmieCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToTranslate = args.text;
|
||||
let temmized = temmize(thingToTranslate);
|
||||
return message.channel.send(temmized);
|
||||
return message.say(temmized);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -160,10 +160,10 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
thingToTranslate)
|
||||
.addField(`Translation (To: ${languages[languageto]}):`,
|
||||
res.text);
|
||||
return message.channel.sendEmbed(embed);
|
||||
return message.embed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.say(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,11 +34,11 @@ module.exports = class YodaCommand extends commando.Command {
|
||||
.query({
|
||||
sentence: turnToYoda
|
||||
});
|
||||
if (!response.text) return message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
return message.channel.send(response.text);
|
||||
if (!response.text) return message.say(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
return message.say(response.text);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.say(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ module.exports = class ZalgoCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let zalgoified = zalgo(args.text);
|
||||
return message.channel.send(zalgoified);
|
||||
return message.say(zalgoified);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user