Update ship Formatting

This commit is contained in:
Daniel Odendahl Jr
2018-07-10 01:57:08 +00:00
parent 313f9c46de
commit 3450d6a8c8
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const Random = require('random-js');
const { stripIndents } = require('common-tags');
module.exports = class ShipCommand extends Command {
constructor(client) {
@@ -28,6 +29,11 @@ module.exports = class ShipCommand extends Command {
run(msg, { first, second }) {
if (first.id === second.id) return msg.reply('Shipping someone with themselves would be pretty weird.');
const random = new Random(Random.engines.mt19937().seed(Math.abs(first.id - second.id)));
return msg.say(`I'd give ${first.username} and ${second.username} a ${random.integer(0, 100)}%!`);
const level = random.integer(0, 100);
const repeat = Math.floor(level / 5);
return msg.say(stripIndents`
${first.username} and ${second.username} have a compatability of... **${level}%**!
💟 \`[${'■'.repeat(repeat)}${' '.repeat(20 - repeat)}]\` 💟
`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "84.2.0",
"version": "84.2.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {