This commit is contained in:
Dragon Fire
2020-05-30 18:25:26 -04:00
parent 5cb5da67ab
commit bec5d61d1d
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -52,17 +52,17 @@ module.exports = class FriendshipCommand extends Command {
async run(msg, { first, second }) {
if (first.id === second.id) return msg.reply('You should be good friends with yourself.');
let calculated;
let level;
const owner = this.client.isOwner(first) || this.client.isOwner(second);
const authorUser = first.id === msg.author.id || second.id === msg.author.id;
if (owner) {
if (authorUser) calculated = 100;
else calculated = 0;
if (authorUser) level = 100;
else level = 0;
} else {
calculated = -Math.abs(Number.parseInt(BigInt(first.id) - BigInt(second.id), 10));
const calculated = -Math.abs(Number.parseInt(BigInt(first.id) - BigInt(second.id), 10));
const random = MersenneTwister19937.seed(calculated);
level = integer(0, 100)(random);
}
const random = MersenneTwister19937.seed(calculated);
const level = integer(0, 100)(random);
const firstAvatarURL = first.displayAvatarURL({ format: 'png', size: 512 });
const secondAvatarURL = second.displayAvatarURL({ format: 'png', size: 512 });
try {
+5 -5
View File
@@ -52,16 +52,16 @@ module.exports = class ShipCommand extends Command {
async run(msg, { first, second }) {
if (first.id === second.id) return msg.reply('Shipping someone with themselves would be pretty weird.');
let calculated;
let level;
const owner = this.client.isOwner(first) || this.client.isOwner(second);
const authorUser = first.id === msg.author.id || second.id === msg.author.id;
if (owner) {
calculated = 0;
level = 0;
} else {
calculated = Math.abs(Number.parseInt(BigInt(first.id) - BigInt(second.id), 10));
const calculated = Math.abs(Number.parseInt(BigInt(first.id) - BigInt(second.id), 10));
const random = MersenneTwister19937.seed(calculated);
level = integer(0, 100)(random);
}
const random = MersenneTwister19937.seed(calculated);
const level = integer(0, 100)(random);
const firstAvatarURL = first.displayAvatarURL({ format: 'png', size: 512 });
const secondAvatarURL = second.displayAvatarURL({ format: 'png', size: 512 });
try {