Some more changed to the bot structure #2
@ -4,6 +4,9 @@ import EventEmitter from 'node:events'
|
||||
class Client extends EventEmitter {
|
||||
constructor(chatRoomID, botName) {
|
||||
super();
|
||||
|
||||
if(!chatRoomID || !botName) return console.error("ChatRoomID or BotName is not defined!");
|
||||
|
||||
this.topicBuffer = Buffer.from(chatRoomID, 'hex');
|
||||
this.botName = botName;
|
||||
this.swarm = new Hyperswarm();
|
||||
|
Loading…
Reference in New Issue
Block a user