Skip to content

Commit

Permalink
improve help for each command
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Pavoni committed Apr 20, 2022
1 parent ff0d1f2 commit 8bbfdfd
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ttfm/commands/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func AdminCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin, ttfm.UserRoleBotModerator},
Help: "Add or remove bot admin. Without arguments it shows the current admins",
Help: "Add or remove bot admin. Usage: `admin [<add|remove> <username>]`. Without arguments it shows the current admins",
Handler: adminCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func BootCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin, ttfm.UserRoleBotModerator},
Help: "Boots a user out of the room",
Help: "Boots a user out of the room. Usage `boot <username>`",
Handler: bootCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/escort.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func EscortCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin, ttfm.UserRoleBotModerator},
Help: "Escort dj off the stage",
Help: "Escort dj off the stage. Usage: `escort <username>`",
Handler: escortCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/fan.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func FanCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Fan user",
Help: "Fan user. Usage: `fan <username>`",
Handler: fanCommandHandler,
}
}
Expand Down
4 changes: 2 additions & 2 deletions ttfm/commands/fav_room.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func FavRoomCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Handle favourite rooms and join one",
Help: "Handle favourite rooms and join one. Usage: `room <list | current | join slug | add slug room_id>`",
Handler: favRoomCommandHandler,
}
}
Expand All @@ -34,7 +34,7 @@ func favRoomCommandHandler(b *ttfm.Bot, cmd *ttfm.CommandInput) *ttfm.CommandOut
}

user, _ := b.Users.UserFromId(cmd.UserId)
msg := "Available favorite room commands: add, remove, list, join"
msg := "Available favorite room commands: add, list, join"
return &ttfm.CommandOutput{Msg: msg, User: user, ReplyType: cmd.Source}
}

Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func HelpCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleNone},
Help: "Show available commands for asking user, or the description of a specific command",
Help: "Show commands help. Usage `help [command]`. Without arguments show the available commands to user",
Handler: helpCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/kill_switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
func KillSwitchCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Kill switch the bot",
Help: "Kills the bot",
Handler: killSwitchCommandHandler}
}

Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func PlaylistCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Handle playlists",
Help: "Handle playlists. Usage: `pl <list|add playlist_name|rm playlist_name|rmsong>`",
Handler: playlistCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func QueueCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleBotModerator},
Help: "Add, remove yourself from queue, or just check the current status",
Help: "Add, remove yourself from queue, or just check the current status. Usage: `q [add|rm]`. Without arguments shows the actual queue",
Handler: queueCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/reaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func ReactionCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleNone},
Help: "React with a gif. Without args shows available reactions. Use `r add <img url> <reaction name>` to add a reaction",
Help: "React with a gif. Without args shows available reactions. Usage: `r add <img url> <reaction name>` to add a reaction",
Handler: reactionCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/say.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func SayCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Say something in the room",
Help: "Say something in the room. Usage: `say <some message>`",
Handler: sayCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/set_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func SetConfigCommand() *ttfm.Command {
return &ttfm.Command{
AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin},
Help: "Set config values at runtime",
Help: "Set config values at runtime. Usage: `cfg [<config_key> [config_value]]`",
Handler: setConfigCommandHandler,
}
}
Expand Down
2 changes: 1 addition & 1 deletion ttfm/commands/unfan.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func UnfanCommand() *ttfm.Command {
return &ttfm.Command{AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin}, Help: "Unfan user", Handler: unfanCommandHandler}
return &ttfm.Command{AuthorizationRoles: []ttfm.UserRole{ttfm.UserRoleAdmin}, Help: "Unfan user. Usage: `unfan <username>`", Handler: unfanCommandHandler}
}

func unfanCommandHandler(b *ttfm.Bot, cmd *ttfm.CommandInput) *ttfm.CommandOutput {
Expand Down

0 comments on commit 8bbfdfd

Please sign in to comment.