Replaced 'setTimeOut' with bot.on('onBotJoinRoom', () => {}); for sending ON_READY_MESSAGE to the chat
This commit is contained in:
@ -27,8 +27,8 @@ class Client extends EventEmitter {
|
||||
joinChatRoom() {
|
||||
this.discovery = this.swarm.join(this.topicBuffer, {client: true, server: true});
|
||||
this.discovery.flushed().then(() => {
|
||||
this.emit('onBotJoinRoom')
|
||||
console.log(`Bot ${this.botName} joined the chat room.`);
|
||||
this.emit('onBotJoinRoom');
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user