Fix peerName in Message received
This commit is contained in:
parent
66dc7cdac2
commit
bd885bb591
@ -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('!')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user