Added !resettoke command to tokebot
This commit is contained in:
parent
d9bab09d53
commit
6639cee8ca
4 changed files with 45 additions and 9 deletions
|
|
@ -213,7 +213,24 @@ class commandProcessor{
|
|||
//send it
|
||||
this.chatHandler.relayServerAnnouncement(commandObj.message, commandObj.links);
|
||||
|
||||
//throw send flag
|
||||
//disble send flag
|
||||
return false;
|
||||
}
|
||||
|
||||
//throw send flag
|
||||
return true;
|
||||
}
|
||||
|
||||
async resettoke(commandObj, preprocessor){
|
||||
//Check if the user has permission, and publicly shame them if they don't (lmao)
|
||||
if(await permissionModel.permCheck(commandObj.socket.user, 'resetToke')){
|
||||
//Acknowledge command
|
||||
this.chatHandler.relayTokeWhisper(commandObj.socket, 'Toke cooldown reset.');
|
||||
|
||||
//Tell tokebot to reset the toke
|
||||
preprocessor.tokebot.resetToke();
|
||||
|
||||
//disable send flag
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -229,7 +246,7 @@ class commandProcessor{
|
|||
if(await chanDB.permCheck(commandObj.socket.user, 'clearChat')){
|
||||
//Send off the command
|
||||
this.chatHandler.clearChat(commandObj.socket.chan, commandObj.argumentArray[1]);
|
||||
//throw send flag
|
||||
//disable send flag
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue