Add timestamp
This commit is contained in:
parent
73fc0e06e0
commit
d248923f1d
7
main.js
7
main.js
|
@ -16,8 +16,11 @@ client.on('messageCreate', async message => {
|
||||||
if (message.channel.id === SOURCE_CHANNEL_ID) {
|
if (message.channel.id === SOURCE_CHANNEL_ID) {
|
||||||
if (message.author.id === client.user.id) return;
|
if (message.author.id === client.user.id) return;
|
||||||
|
|
||||||
// Add the new message to the queue
|
const timestamp = new Date(message.createdTimestamp).toISOString();
|
||||||
messageQueue.push(`<@${message.author.id}> / **${message.author.tag}**: ${message.content}`);
|
|
||||||
|
const formattedMessage = `<@${message.author.id}> / **${message.author.tag}**: ${message.content} \`${timestamp}\``;
|
||||||
|
|
||||||
|
messageQueue.push(formattedMessage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue