mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Update ship Formatting
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const Random = require('random-js');
|
const Random = require('random-js');
|
||||||
|
const { stripIndents } = require('common-tags');
|
||||||
|
|
||||||
module.exports = class ShipCommand extends Command {
|
module.exports = class ShipCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -28,6 +29,11 @@ module.exports = class ShipCommand extends Command {
|
|||||||
run(msg, { first, second }) {
|
run(msg, { first, second }) {
|
||||||
if (first.id === second.id) return msg.reply('Shipping someone with themselves would be pretty weird.');
|
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)));
|
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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "84.2.0",
|
"version": "84.2.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user