hebdobot/bot/hooks/help.py

45 lines
1.8 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import logger
class Help:
def process(self, bot, channel, sender, message):
"""
Le message est pris en compte si l'utilisateur demande de l'aide.
"""
if message.lower() in ("!aide", "!help", "!aide hebdobot", "!help hebdobot"):
logger.info("!help caught.")
bot.send(
sender,
f"Bienvenue {sender}. Je suis {bot.nickname}, le robot de gestion "
"des revues hebdomadaires de l'April.",
)
bot.send(sender, "Voici les commandes que je comprends :")
bot.send(sender, " ")
bot.send(sender, " !aide,!help : afficher cette aide")
bot.send(
sender,
" !aide commande : afficher l'aide de la commande !commande"
)
bot.send(sender, " !début : commencer une nouvelle revue")
bot.send(sender, " % message  : traiter comme un commentaire")
bot.send(sender, " # titre  : démarrer un sujet individuel")
bot.send(sender, " ## titre  : démarrer un sujet collectif")
bot.send(
sender,
" !oups   : annuler la dernière entrée dans un point de "
"revue",
)
bot.send(sender, " !courant : afficher le sujet en cours")
bot.send(sender, " !fin : terminer la revue en cours")
bot.send(sender, " !stop  : abandonner la revue en cours")
bot.send(sender, " ")
bot.send(
sender,
"Autres commandes : !anniv, !bonjour, !chrono, !date, !hello, "
"!licence, !manquants, !merci, !record, !salut, !stats, !status, "
"!version",
)
return True