Add timestamp

This commit is contained in:
Wizzard 2024-02-05 17:09:55 -05:00
parent 73fc0e06e0
commit d248923f1d
1 changed files with 5 additions and 2 deletions

View File

@ -16,8 +16,11 @@ client.on('messageCreate', async message => {
if (message.channel.id === SOURCE_CHANNEL_ID) {
if (message.author.id === client.user.id) return;
// Add the new message to the queue
messageQueue.push(`<@${message.author.id}> / **${message.author.tag}**: ${message.content}`);
const timestamp = new Date(message.createdTimestamp).toISOString();
const formattedMessage = `<@${message.author.id}> / **${message.author.tag}**: ${message.content} \`${timestamp}\``;
messageQueue.push(formattedMessage);
}
});