refactor(commands): standardize parameter conventions

This commit is contained in:
tiennm99 committed 2026-07-21 14:51:28 +07:00
1 parent a211b7f8b7
commit d2c3129d41
10 files changed
+329 -21

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import (
"github.com/tiennm99/miti99bot/internal/modules/util/chathelper"
)
const randomUsage = "Usage: /random <options(comma-separated)>"
const randomUsage = "Usage: /random <option,...>"
func splitWheelOptions(arg string) []string {
parts := strings.Split(arg, ",")
@@ -30,7 +30,7 @@ func randomCommand() modules.Command {
Name: "random",
Visibility: modules.VisibilityPublic,
Description: "Pick one random comma-separated option",
Parameters: "<options(comma-separated)>",
Parameters: "<option,...>",
Handler: func(ctx context.Context, b *bot.Bot, update *models.Update) error {
if update.Message == nil {
return nil
@@ -24,7 +24,7 @@ func wheelOfNamesCommand() modules.Command {
Name: "wheelofnames",
Visibility: modules.VisibilityPublic,
Description: "Pick one comma-separated option with wheel GIF when configured",
Parameters: "<options(comma-separated)>",
Parameters: "<option,...>",
Handler: func(ctx context.Context, b *bot.Bot, update *models.Update) error {
if update.Message == nil {
return nil
@@ -63,7 +63,7 @@ func wheelOfNamesCommand() modules.Command {
}
}
const wheelUsage = "Usage: /wheelofnames <options(comma-separated)>"
const wheelUsage = "Usage: /wheelofnames <option,...>"
func wheelResultCaption(result string) string {
result = truncateWheelResultCaption(result)