Fix peerName in Message received

This commit is contained in:
Raven Scott 2024-06-14 04:46:19 -04:00
parent 66dc7cdac2
commit bd885bb591

View File

@ -41,7 +41,7 @@ loadCommands().then(commands => {
bot.on('onMessage', (peer, message) => { bot.on('onMessage', (peer, message) => {
console.log(message); console.log(message);
console.log(`Message received from ${message.name}@${message.topic} at ${new Date(message.timestamp).toLocaleTimeString()}: ${message.message}`); console.log(`Message received from ${message.peerName}@${message.topic} at ${new Date(message.timestamp).toLocaleTimeString()}: ${message.message}`);
// Check if the message starts with a command prefix // Check if the message starts with a command prefix
if (message.message.startsWith('!')) { if (message.message.startsWith('!')) {