diff --git a/chatBot/bot.js b/chatBot/bot.js index c1359b9..2dcb9ba 100644 --- a/chatBot/bot.js +++ b/chatBot/bot.js @@ -1,6 +1,6 @@ import fs from 'fs'; import path from 'path'; -import Client from './includes/client.js'; // Adjust the import path as necessary +import Client from './includes/Client.js'; // Adjust the import path as necessary import 'dotenv/config'; // Create a new instance of the chatBot class with a valid botName diff --git a/chatBot/includes/chatroom.js b/chatBot/includes/ChatRoom.js similarity index 98% rename from chatBot/includes/chatroom.js rename to chatBot/includes/ChatRoom.js index 89b2afe..0686013 100644 --- a/chatBot/includes/chatroom.js +++ b/chatBot/includes/ChatRoom.js @@ -3,8 +3,6 @@ class ChatRoom { this.topic = topic; this.peers = peers; } - - } export default ChatRoom; \ No newline at end of file diff --git a/chatBot/includes/client.js b/chatBot/includes/Client.js similarity index 100% rename from chatBot/includes/client.js rename to chatBot/includes/Client.js diff --git a/chatBot/includes/FileMessage.js b/chatBot/includes/FileMessage.js new file mode 100644 index 0000000..55d58b4 --- /dev/null +++ b/chatBot/includes/FileMessage.js @@ -0,0 +1,12 @@ +class FileMessage { + public FileMessage(chatRoom, userPeer, fileName, fileUrl, fileType, timestamp) { + this.chatRoom = chatRoom; + this.userPeer = userPeer; + this.fileName = fileName; + this.fileUrl = fileUrl; + this.fileType = fileType; + this.timestamp = timestamp; + } +} + +export default FileMessage; \ No newline at end of file diff --git a/chatBot/includes/TextMessage.js b/chatBot/includes/TextMessage.js new file mode 100644 index 0000000..f3a8021 --- /dev/null +++ b/chatBot/includes/TextMessage.js @@ -0,0 +1,10 @@ +class TextMessage { + public TextMessage(chatRoom, userPeer, message, timestamp) { + this.chatRoom = chatRoom; + this.userPeer = userPeer; + this.message = message; + this.timestamp = timestamp; + } +} + +export default TextMessage; \ No newline at end of file diff --git a/chatBot/includes/UserPeer.js b/chatBot/includes/UserPeer.js new file mode 100644 index 0000000..9546499 --- /dev/null +++ b/chatBot/includes/UserPeer.js @@ -0,0 +1,10 @@ +class UserPeer { + public UserPeer(peer, topics, username, avatar) { + this.peer = peer; + this.topics = topics; + this.username = username; + this.avatar = avatar; + } +} + +export default UserPeer; \ No newline at end of file