mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
Update ship Formatting
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "84.2.0",
|
||||
"version": "84.2.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user