diff --git a/commands/random-seed/friendship.js b/commands/random-seed/friendship.js index ecd83b21..721814d4 100644 --- a/commands/random-seed/friendship.js +++ b/commands/random-seed/friendship.js @@ -55,7 +55,8 @@ module.exports = class FriendshipCommand extends Command { 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 && (first.id === this.client.user.id || second.id === this.client.user.id)) { + const botUser = first.id === this.client.user.id || second.id === this.client.user.id; + if (owner && botUser) { if (authorUser) level = 100; else level = 0; } else { @@ -87,7 +88,7 @@ module.exports = class FriendshipCommand extends Command { ctx.font = '60px Pinky Cupid'; ctx.fillStyle = percentColor(level / 100, percentColors); ctx.fillText(`~${level}%~`, 600, 230); - ctx.fillText(this.calculateLevelText(level, owner, authorUser), 600, 296); + ctx.fillText(this.calculateLevelText(level, owner, authorUser, botUser), 600, 296); ctx.font = '90px Pinky Cupid'; ctx.fillText(level > 49 ? '👍' : '👎', 600, 100); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'friendship.png' }] }); @@ -96,8 +97,8 @@ module.exports = class FriendshipCommand extends Command { } } - calculateLevelText(level, owner, authorUser) { - if (owner) { + calculateLevelText(level, owner, authorUser, botUser) { + if (owner && botUser) { if (authorUser) return 'Perfect'; else return 'Yuck'; } diff --git a/commands/random-seed/ship.js b/commands/random-seed/ship.js index 4bf7188f..7cdf6c07 100644 --- a/commands/random-seed/ship.js +++ b/commands/random-seed/ship.js @@ -55,7 +55,8 @@ module.exports = class ShipCommand extends Command { 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 && (first.id === this.client.user.id || second.id === this.client.user.id)) { + const botUser = first.id === this.client.user.id || second.id === this.client.user.id; + if (owner && botUser) { level = 0; } else { const calculated = Math.abs(Number.parseInt(BigInt(first.id) - BigInt(second.id), 10)); @@ -86,7 +87,7 @@ module.exports = class ShipCommand extends Command { ctx.font = '60px Pinky Cupid'; ctx.fillStyle = percentColor(level / 100, percentColors); ctx.fillText(`~${level}%~`, 600, 230); - ctx.fillText(this.calculateLevelText(level, owner, authorUser), 600, 296); + ctx.fillText(this.calculateLevelText(level, owner, authorUser, botUser), 600, 296); ctx.font = '90px Pinky Cupid'; ctx.fillText(level > 49 ? '❤️' : '💔', 600, 100); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'ship.png' }] }); @@ -95,8 +96,8 @@ module.exports = class ShipCommand extends Command { } } - calculateLevelText(level, owner, authorUser) { - if (owner) { + calculateLevelText(level, owner, authorUser, botUser) { + if (owner && botUser) { if (authorUser) return 'Pervert'; else return 'Yuck'; }