mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Use globalName
This commit is contained in:
@@ -18,6 +18,7 @@ module.exports = class ComplimentCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
return msg.say(`${user.username}, ${compliments[Math.floor(Math.random() * compliments.length)]}`);
|
||||
const compliment = compliments[Math.floor(Math.random() * compliments.length)];
|
||||
return msg.say(`${user.globalName || user.username}, ${compliment}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = class RoastCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
return msg.say(`${user.username}, ${roasts[Math.floor(Math.random() * roasts.length)]}`);
|
||||
const roast = roasts[Math.floor(Math.random() * roasts.length)];
|
||||
return msg.say(`${user.globalName || user.username}, ${roast}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user