Added !resettoke command to tokebot
This commit is contained in:
parent
d9bab09d53
commit
6639cee8ca
4 changed files with 45 additions and 9 deletions
|
|
@ -124,16 +124,12 @@ module.exports = class{
|
|||
}
|
||||
}
|
||||
|
||||
relayUserChat(socket, msg, type, links){
|
||||
const user = this.server.getSocketInfo(socket);
|
||||
this.relayChat(user.user, user.flair, user.highLevel, msg, type, socket.chan, links)
|
||||
}
|
||||
|
||||
//Base chat functions
|
||||
relayChat(user, flair, highLevel, msg, type = 'chat', chan, links){
|
||||
this.server.io.in(chan).emit("chatMessage", {user, flair, highLevel, msg, type, links});
|
||||
}
|
||||
|
||||
relayServerWisper(socket, user, flair, highLevel, msg, type, links){
|
||||
relayPrivateChat(socket, user, flair, highLevel, msg, type, links){
|
||||
socket.emit("chatMessage", {user, flair, highLevel, msg, type, links});
|
||||
}
|
||||
|
||||
|
|
@ -141,18 +137,26 @@ module.exports = class{
|
|||
this.server.io.emit("chatMessage", {user, flair, highLevel, msg, type, links});
|
||||
}
|
||||
|
||||
//User Chat Functions
|
||||
relayUserChat(socket, msg, type, links){
|
||||
const user = this.server.getSocketInfo(socket);
|
||||
this.relayChat(user.user, user.flair, user.highLevel, msg, type, socket.chan, links)
|
||||
}
|
||||
|
||||
//Toke Chat Functions
|
||||
relayTokeCallout(msg, links){
|
||||
this.relayGlobalChat("Tokebot", "", '∞', msg, "toke", links);
|
||||
}
|
||||
|
||||
relayTokeWhisper(socket, msg, links){
|
||||
this.relayServerWisper(socket, "Tokebot", "", '∞', msg, "tokewhisper", links);
|
||||
this.relayPrivateChat(socket, "Tokebot", "", '∞', msg, "tokewhisper", links);
|
||||
}
|
||||
|
||||
relayGlobalTokeWhisper(msg, links){
|
||||
this.relayGlobalChat("Tokebot", "", '∞', msg, "tokewhisper", links);
|
||||
}
|
||||
|
||||
//Announcement Functions
|
||||
relayServerAnnouncement(msg, links){
|
||||
this.relayGlobalChat("Server", "", '∞', msg, "announcement", links);
|
||||
}
|
||||
|
|
@ -166,6 +170,7 @@ module.exports = class{
|
|||
}
|
||||
}
|
||||
|
||||
//Misc Functions
|
||||
clearChat(chan, user){
|
||||
const activeChan = this.server.activeChannels.get(chan);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue