Ajout d'un cocoquit

This commit is contained in:
hadware
2018-05-30 17:28:37 +02:00
parent 31698065e6
commit 2accf0c8a4
3 changed files with 23 additions and 4 deletions
+12
View File
@@ -62,6 +62,9 @@ class CocoConnectCommand(BaseCocobotCommand):
if len(age) != 2 or not age.isnumeric():
return Message("L'âge c'est avec DEUX chiffres (déso bulbi)")
if int(age) < 15:
return Message("L'âge minimum c'est 15 ans (déso bubbi)")
if len(zip_code) != 5 or not zip_code.isnumeric():
return Message("Le code postal c'est 5 chiffres, pd")
@@ -98,6 +101,15 @@ class CocoListCommand(BaseCocobotCommand):
return self.cococlient.list_convs()
class CocoQuitCommand(BaseCocobotCommand):
HELP_STR = "/cocoquit"
_cmd_suffix = "quit"
def process(self, text : str, sender_id : str, users_list : UserList):
self.cococlient.disconnect()
return BotMessage("Déconnecté!")
class BotHelp(MessageProcessor):
"""Displays the help string for all processors in the list that have a helpt string"""