@ -62,14 +62,14 @@ pingResponse _ = return $ interactionResponseBasic "Pong"
edtCommand :: Config -> Maybe CreateApplicationCommand
edtCommand :: Config -> Maybe CreateApplicationCommand
edtCommand c =
edtCommand c =
createChatInput " edt " " Gets the planning for a group "
createChatInput " edt " " Affiche l'emploi du temps "
>>= \ cac -> return $ cac
>>= \ cac -> return $ cac
{ createOptions =
{ createOptions =
Just $ OptionsValues
Just $ OptionsValues
[ OptionValueString
[ OptionValueString
" group "
" group "
Nothing
Nothing
" The group for which the planning is requested "
" Le groupe pour lequel afficher l'emploi du temps "
Nothing
Nothing
True
True
( Right $ map ( \ x -> Choice x Nothing x ) $ groupNames c )
( Right $ map ( \ x -> Choice x Nothing x ) $ groupNames c )
@ -77,7 +77,7 @@ edtCommand c =
, OptionValueString
, OptionValueString
" day "
" day "
Nothing
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
Nothing
False
False
( Left False )
( Left False )
@ -106,11 +106,11 @@ edtResponse _ _ = return $ interactionResponseBasic
remindCommand :: Maybe CreateApplicationCommand
remindCommand :: Maybe CreateApplicationCommand
remindCommand =
remindCommand =
createChatInput " remind " " reminds you of something later on "
createChatInput " remind " " Crée un rapel pour plus tard "
>>= \ cac -> return $ cac
>>= \ cac -> return $ cac
{ createOptions =
{ createOptions =
Just $ OptionsValues
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
, OptionValueString " message " Nothing " message " Nothing True ( Left False ) Nothing Nothing
]
]
}
}
@ -151,9 +151,9 @@ remindResponse (Just (OptionsDataValues opts)) evts ch mou
liftIO $ registerRemind rmd
liftIO $ registerRemind rmd
return
return
$ interactionResponseBasic
$ interactionResponseBasic
$ " Reminder registered sucessfully for "
$ " Rappel enregistré avec succes pour le "
` T . append ` T . pack ( show remindDateTime )
` 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
where
parsedOpts = Map . fromList $ map parseOpt opts
parsedOpts = Map . fromList $ map parseOpt opts
delay' =
delay' =
@ -201,7 +201,7 @@ groupResponse c mou gid (Just (OptionsDataValues opts))
restCall $ AddGuildMemberRole gid uid rid
restCall $ AddGuildMemberRole gid uid rid
return
return
$ interactionResponseBasic
$ interactionResponseBasic
$ " You are now part of group "
$ " Vous faîtes désormait partie du groupe "
` T . append ` group
` T . append ` group
where
where
group =
group =
@ -221,8 +221,8 @@ helpResponse :: IO InteractionResponse
helpResponse =
helpResponse =
return
return
. interactionResponseBasic
. 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 ) "