mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-17 10:15:09 +00:00
feat(commands): improve discovery and normalize parameters
This commit is contained in:
1 parent
3316eec74c
commit
f5ba9d4032
31 files changed
+479
-56
No files matched your search
@@ -20,7 +20,7 @@ const statsUsage = `Usage:
|
||||
/stats
|
||||
/stats users
|
||||
/stats user <username>
|
||||
/stats cmd <name>`
|
||||
/stats cmd <command_name>`
|
||||
|
||||
type row struct {
|
||||
display string
|
||||
@@ -32,6 +32,8 @@ func statsCommand(c *counter) modules.Command {
|
||||
Name: "stats",
|
||||
Visibility: modules.VisibilityPublic,
|
||||
Description: "Show command usage statistics",
|
||||
Parameters: "[users | user <username> | cmd <command_name>]",
|
||||
Example: "/stats user alice",
|
||||
Handler: func(ctx context.Context, b *bot.Bot, update *models.Update) error {
|
||||
if update.Message == nil {
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user