test
This commit is contained in:
parent
27b3f9a2fd
commit
b5ed4fa6be
@ -38,10 +38,12 @@ module.exports = {
|
||||
const discordName = user ? (user.globalName ? user.globalName : user.username) : link.discord_username;
|
||||
const discordMention = `<@${link.discord_id}>`;
|
||||
|
||||
// date de la dernière connexion formatée pour affichage discord
|
||||
const lastConnectionText = link.lastConnection
|
||||
? `<t:${Math.floor(new Date(link.lastConnection).getTime() / 1000)}:f>`
|
||||
: 'Jamais connecté';
|
||||
// temps depuis la dernière connexion formatée pour affichage discord
|
||||
let lastConnectionText = 'Jamais connecté';
|
||||
if (link.lastConnection) {
|
||||
const lastDate = new Date(link.lastConnection);
|
||||
lastConnectionText = `<t:${Math.floor(lastDate.getTime() / 1000)}:R>`;
|
||||
}
|
||||
|
||||
embed.addFields({
|
||||
name: `👤 ${discordName} - 🎮 ${link.palworld_username} - ${lastConnectionText}`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user