mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-23 18:04:41 +02:00
améliore + command pic
This commit is contained in:
@@ -22,13 +22,17 @@ module.exports = {
|
||||
}
|
||||
|
||||
let avatar = user.avatarURL({dynamic : true, size : 1024});
|
||||
if (user.avatarURL({dynamic : true, size : 1024}) === null) {
|
||||
return message.reply('L\'utilisateur n\'a pas d\'avatar.');
|
||||
if (avatar === null && user.discriminator !== '0') {
|
||||
const index = user.discriminator % 5;
|
||||
avatar = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
||||
} else if (avatar === null) {
|
||||
const index = (BigInt(user.id) >> 22n) % 6n;
|
||||
avatar = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
||||
}
|
||||
|
||||
const button = new ButtonBuilder()
|
||||
.setLabel('Avatar url')
|
||||
.setURL(user.avatarURL({dynamic : true, size : 1024}))
|
||||
.setURL(avatar)
|
||||
.setStyle(ButtonStyle.Link);
|
||||
|
||||
const row = new ActionRowBuilder()
|
||||
|
||||
Reference in New Issue
Block a user