store: show uses in the /issue menu hint

This commit is contained in:
shum committed 2026-10-31 08:50:49 +00:00
1 parent 3a153f8e0f
commit fc777bdc19
3 files changed
+3 -3

No files matched your search

@@ -158,7 +158,7 @@ cmdLabel = \case
-- The menu hints and the usage replies are built from the same kinds, options and bounds, so they cannot drift apart.
cmdParams :: CmdTag -> Text
cmdParams = \case
CTIssue -> kindParams
CTIssue -> kindParams <> " [" <> optArg usesOpt <> "]"
CTBulk -> kindParams <> " " <> optArg countOpt
CTRevoke -> "<code>"
where
@@ -1578,7 +1578,7 @@ issueUsage = "Usage: /issue <kind> [<length>] [years <Y> | months <M>] [uses <N>
-- The list is spelled out rather than taken from the service, so a change there fails here.
expectedCommands :: [ChatBotCommand]
expectedCommands =
[ CBCCommand "issue" "Generate a code" (Just "<name <length>|supporter|legend|investor> [years|months <N>]"),
[ CBCCommand "issue" "Generate a code" (Just "<name <length>|supporter|legend|investor> [years|months <N>] [uses <N>]"),
CBCCommand "bulk" "Generate many codes" (Just "<name <length>|supporter|legend|investor> [years|months <N>] count <N>"),
CBCCommand "revoke" "Revoke a code" (Just "<code>")
]
+1 -1
View File
@@ -85,7 +85,7 @@ badgeGroupTests = describe "badge group" $ do
]
it "advertises every kind of code in the issue and bulk menu entries" $
groupCommands
`shouldBe` [ CBCCommand "issue" "Generate a code" (Just "<name <length>|supporter|legend|investor> [years|months <N>]"),
`shouldBe` [ CBCCommand "issue" "Generate a code" (Just "<name <length>|supporter|legend|investor> [years|months <N>] [uses <N>]"),
CBCCommand "bulk" "Generate many codes" (Just "<name <length>|supporter|legend|investor> [years|months <N>] count <N>"),
CBCCommand "revoke" "Revoke a code" (Just "<code>")
]