mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-18 22:13:51 +00:00
refactor(commands): standardize parameter conventions
This commit is contained in:
1 parent
a211b7f8b7
commit
d2c3129d41
10 files changed
+329
-21
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user