Несколько дней назад я сделал код, чтобы упоминать пользователей, когда они присоединяются к моему серверу раздоров, вот код, который у меня сейчас есть:
bot.on( "guildMemberAdd", member => {
let textChannel = member.guild.channels.find(channel => channel.id === '569582472812298240');
if (textChannel){
var messages = [
`Brace yourselves. <@${member.user.id}> just joined the server.`,
`Challenger approaching - <@${member.user.id}> has appeared`,
`Welcome <@${member.user.id}>. Leave your weapon by the door.`,
`Big <@${member.user.id}> showed up!`,
`<@${member.user.id}> just joined... or did they?`,
`Ready player <@${member.user.id}>`,
`<@${member.user.id}> hopped into the server. Kangaroo!!`,
`<@${member.user.id}> joined. You must construct additional pylons.`,
`Hello. Is it <@${member.user.id}> you're looking for?`,
`Where's <@${member.user.id}> in the server!`,
`It's dangerous to go alone, take <@${member.user.id}>`
]
textChannel.send({embed: {
color: 3447003,
description: messages[ Math.floor( Math.random() * 11 ) ],
timestamp: new Date(),
}
});
}
});
Проблема?Иногда я получаю правильный псевдоним человека, как вы можете видеть на этой картинке, но в других случаях я получаю только цифры и даже не могу нажать на эту «ссылку» ...
Правильный путь:
Они кликабельны, и я вижу их профиль.
Неправильный способ:
Я не могу щелкнуть по их идентификатору, с этим ничего не поделаешь.
Не уверен, почему это происходит случайно, любойпомощь будет очень признателен.