By | fr33domlover |
At | 2016-01-09 |
Title | make !help show command examples |
Description |
Edit file src/FunBot/Commands/Info.hs 33188 → 33188
60 60 cset <- askBehaviorS $ head . commandSets
61 61 let cname' = CommandName $ CI.mk $ case T.uncons cname of
62 62 Nothing -> cname
63 63 Just (c, r) -> if c == csetPrefix cset then r else cname
64 64 case find ((cname' `elem`) . cmdNames) $ csetCommands cset of
- 65 Just cmd -> send $ MsgContent $ cmdHelp cmd
- 66 <> "\nCommand names: "
- 67 <> T.intercalate ", " (map (CI.original . unCommandName) $ cmdNames cmd)
+ 65 Just cmd -> send $ MsgContent $
+ 66 cmdHelp cmd <>
+ 67 "\nCommand names: " <>
+ 68 T.intercalate ", " (map (CI.original . unCommandName) $ cmdNames cmd) <>
+ 69 T.concat (map ("\nExample: " <>) $ cmdExamples cmd)
68 70 Nothing -> do
69 71 succ <- respondSettingsHelp cname send
70 72 unless succ $ send $ MsgContent
71 73 "No such command, or invalid settings path. \
72 74 \Maybe try just ‘!help’ without a parameter."
… … … …