mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 22:44:32 +02:00
Improve ship command
This commit is contained in:
@@ -29,14 +29,17 @@ 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 botText = first.id === this.client.user.id || second.id === this.client.user.id
|
||||
? `But ${first.id === msg.author.id || second.id === msg.author.id ? 'you\'re' : 'they\'re'} still rejected.`
|
||||
: '';
|
||||
const authorInvolved = first.id === msg.author.id || second.id === msg.author.id;
|
||||
const random = new Random(Random.engines.mt19937().seed(Math.abs(first.id - second.id)));
|
||||
const level = random.integer(0, 100);
|
||||
const botText = first.id === this.client.user.id || second.id === this.client.user.id
|
||||
? level >= 70
|
||||
? `But ${authorInvolved ? 'you\'re' : 'they\'re'} still rejected.`
|
||||
: `Haha even a bot thinks ${authorInvolved ? 'you\'re' : 'they\'re'} lame.`
|
||||
: '';
|
||||
return msg.say(oneLine`
|
||||
${first.id === this.client.user.id ? 'Me' : first.username} and
|
||||
${second.id === this.client.user.id ? 'me' : second.username} have a compatability of... **${level}%**! ${botText}
|
||||
${second.id === this.client.user.id ? 'I' : second.username} have a compatability of... **${level}%**! ${botText}
|
||||
`);
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "102.0.0",
|
||||
"version": "102.0.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user