mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Fixed NaN date
This commit is contained in:
+14
-4
@@ -106,15 +106,25 @@ const EMBEDS = {
|
||||
title = `📺 ${locale.__('userinfo.watching_x', { NAME: activity.name })}`;
|
||||
break;
|
||||
case ActivityType.Competing:
|
||||
title = `'🌠 ${locale.__('userinfo.competing_x', { NAME: activity.name })}`;
|
||||
title = `🌠 ${locale.__('userinfo.competing_x', { NAME: activity.name })}`;
|
||||
break;
|
||||
}
|
||||
const startTime = activity.timestamps?.start;
|
||||
const endTime = activity.timestamps?.end;
|
||||
embed.addFields({
|
||||
name: `${title}`,
|
||||
value: `${activity.details === null ? '' : activity.details}
|
||||
${activity.state === null ? '' : activity.state}
|
||||
Since <t:${Math.round(new Date(activity.createdAt).getTime() / 1000)}:R>
|
||||
\u200b`,
|
||||
${activity.state === null ? '' : activity.state}
|
||||
${
|
||||
startTime
|
||||
? `Since <t:${Math.round(startTime.getTime() / 1000)}:R>`
|
||||
: ''
|
||||
}${
|
||||
endTime
|
||||
? `\nEnd <t:${Math.round(endTime.getTime() / 1000)}:R>`
|
||||
: ''
|
||||
}
|
||||
\u200b`,
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user