Started work on flair
This commit is contained in:
parent
0fcd72b063
commit
4b4cb2ed3d
9 changed files with 149 additions and 10 deletions
|
|
@ -42,6 +42,10 @@ class channel{
|
|||
this.socket.on("connect", () => {
|
||||
document.title = `${this.channelName} - Connected`
|
||||
});
|
||||
|
||||
this.socket.on("error", (data) => {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class chatBox{
|
|||
}
|
||||
|
||||
defineListeners(){
|
||||
this.client.socket.on("chat-message", (data) => {
|
||||
this.client.socket.on("chatMessage", (data) => {
|
||||
this.displayChat(data);
|
||||
});
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ class chatBox{
|
|||
|
||||
async send(event){
|
||||
if((!event || !event.key || event.key == "Enter") && this.chatPrompt.value){
|
||||
this.client.socket.emit("chat-message",{msg: this.chatPrompt.value, high: this.highLevel.value});
|
||||
this.client.socket.emit("chatMessage",{msg: this.chatPrompt.value, high: this.highLevel.value});
|
||||
this.chatPrompt.value = "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue