Files
lilyissillyyy 46e7a9e244 Use globalName
2025-09-18 16:11:31 -04:00

43 lines
1.3 KiB
JavaScript

const Command = require('../../framework/Command');
const { MersenneTwister19937, integer } = require('random-js');
const texts = require('../../assets/json/butt');
module.exports = class ButtCommand extends Command {
constructor(client) {
super(client, {
name: 'butt',
aliases: ['butts', 'ass', 'booty'],
group: 'random-seed',
description: 'Determines a user\'s butt quality.',
credit: [
{
name: 'iCrawl',
url: 'https://github.com/iCrawl',
reason: 'Code, Concept',
reasonURL: 'https://github.com/iCrawl/Tohru/blob/master/src/commands/fun/butts.js'
}
],
args: [
{
key: 'user',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
const authorUser = user.id === msg.author.id;
const displayName = user.globalName || user.username;
if (user.id === this.client.user.id) return msg.reply('Me? I think I have the best butt around!');
if (this.client.isOwner(user)) {
if (authorUser) return msg.reply('ur butt is the best, mother');
return msg.reply(`${displayName}'s butt is... Something, I'll say that much.`);
}
const random = MersenneTwister19937.seed(user.id);
const quality = integer(0, texts.length - 1)(random);
return msg.reply(`${authorUser ? 'ur' : `${displayName}'s`} butt is ${texts[quality]}`);
}
};