mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Use globalName
This commit is contained in:
@@ -29,13 +29,14 @@ module.exports = class ButtCommand extends Command {
|
||||
|
||||
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(`${user.username}'s butt is... Something, I'll say that much.`);
|
||||
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' : `${user.username}'s`} butt is ${texts[quality]}`);
|
||||
return msg.reply(`${authorUser ? 'ur' : `${displayName}'s`} butt is ${texts[quality]}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user