@ -62,14 +62,14 @@ pingResponse _ = return $ interactionResponseBasic "Pong"
edtCommand :: Config -> Maybe CreateApplicationCommand
edtCommand c =
createChatInput " edt " " Gets the planning for a group "
createChatInput " edt " " Affiche l'emploi du temps "
>>= \ cac -> return $ cac
{ createOptions =
Just $ OptionsValues
[ OptionValueString
" group "
Nothing
" The group for which the planning is requested "
" Le groupe pour lequel afficher l'emploi du temps "
Nothing
True
( Right $ map ( \ x -> Choice x Nothing x ) $ groupNames c )
@ -77,7 +77,7 @@ edtCommand c =
, OptionValueString
" day "
Nothing
" The day(s) for which the planning is requested (today, tomorrow, week or DD/MM/YYYY )"
" Le(s) jour(s) pour le(s)quel(s) afficher l'emploi du temps (today (aujourd'hui), tomorrow (demain), week (semaine) or JJ/MM/AAAA )"
Nothing
False
( Left False )
@ -106,11 +106,11 @@ edtResponse _ _ = return $ interactionResponseBasic
remindCommand :: Maybe CreateApplicationCommand
remindCommand =
createChatInput " remind " " reminds you of something later on "
createChatInput " remind " " Crée un rapel pour plus tard "
>>= \ cac -> return $ cac
{ createOptions =
Just $ OptionsValues
[ OptionValueString " delay " Nothing " delay " Nothing True ( Left False ) Nothing Nothing
[ OptionValueString " delay " Nothing " délai " Nothing True ( Left False ) Nothing Nothing
, OptionValueString " message " Nothing " message " Nothing True ( Left False ) Nothing Nothing
]
}
@ -151,9 +151,9 @@ remindResponse (Just (OptionsDataValues opts)) evts ch mou
liftIO $ registerRemind rmd
return
$ interactionResponseBasic
$ " Reminder registered sucessfully for "
$ " Rappel enregistré avec succes pour le "
` T . append ` T . pack ( show remindDateTime )
else return $ interactionResponseBasic " couldn't parse your delay :/ "
else return $ interactionResponseBasic " Le délai n'a pas pu être interprété "
where
parsedOpts = Map . fromList $ map parseOpt opts
delay' =
@ -201,7 +201,7 @@ groupResponse c mou gid (Just (OptionsDataValues opts))
restCall $ AddGuildMemberRole gid uid rid
return
$ interactionResponseBasic
$ " You are now part of group "
$ " Vous faîtes désormait partie du groupe "
` T . append ` group
where
group =
@ -221,8 +221,8 @@ helpResponse :: IO InteractionResponse
helpResponse =
return
. interactionResponseBasic
$ " **__Help fo r Bot IUT__** \ n \ n "
` T . append ` " `/help` shows this help messag e \ n "
` T . append ` " `/group <group>` join a group \ n "
` T . append ` " `/remind <time><s|m|h|d> <message>` reminds you of something in the future \ n "
` T . append ` " `/edt <group> [week|today|tomorrow|dd/mm/yyyy]` get the planning for group `group` on `day` (`day` defaults to `week` ) "
$ " **__Aide pou r Bot IUT__** \ n \ n "
` T . append ` " `/help` afficher ce message d'aid e \ n "
` T . append ` " `/group <group>` rejoindre un groupe \ n "
` T . append ` " `/remind <time><s|m|h|d> <message>` Créer un rappel pour plus tard \ n "
` T . append ` " `/edt <group> [week|today|tomorrow|jj/mm/aaaa]` Affiche l'emploi du temps pour le groupe `group` pour le jour `day` (`day` est `week` par défaut ) "