Started working on making the bot be in multiple chatrooms
This commit is contained in:
@ -35,7 +35,7 @@ async function loadCommands() {
|
||||
|
||||
loadCommands().then(commands => {
|
||||
// Create the chatBot instance with the defined onMessageReceived function
|
||||
const bot = new Client(process.env.LINKUP_ROOM_ID, botName);
|
||||
const bot = new Client(botName);
|
||||
|
||||
// We use Event Emitter here to handle new messages
|
||||
bot.on('onMessage', (peer, message) => {
|
||||
@ -64,7 +64,8 @@ loadCommands().then(commands => {
|
||||
bot.sendMessage(process.env.ON_READY_MESSAGE);
|
||||
});
|
||||
|
||||
bot.joinChatRoom();
|
||||
bot.joinChatRoom(1234);
|
||||
bot.joinChatRoom(5678);
|
||||
}).catch(error => {
|
||||
console.error('Error loading commands:', error);
|
||||
});
|
||||
|
Reference in New Issue
Block a user