Skip to content

Commit

Permalink
more consistent help, unexport eightball, help colors command name
Browse files Browse the repository at this point in the history
  • Loading branch information
quackduck committed Sep 7, 2023
1 parent 2ac2317 commit 25a86b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,33 @@ var (
{"emojis", emojisCMD, "", "See a list of emojis"},
{"bell", bellCMD, "on|off|all", "ANSI bell on pings (on), never (off) or for every message (all)"},
{"clear", clearCMD, "", "Clear the screen"},
{"hang", hangCMD, "`char|word`", "Play hangman"}, // won't actually run, here just to show in docs
{"hang", hangCMD, "`char`|`word`", "Play hangman"}, // won't actually run, here just to show in docs
{"tic", ticCMD, "`cell num`", "Play tic tac toe!"},
{"devmonk", devmonkCMD, "", "Test your typing speed"},
{"cd", cdCMD, "#room|user", "Join #room, DM user or run cd to see a list"}, // won't actually run, here just to show in docs
{"cd", cdCMD, "#`room`|`user`", "Join #room, DM user or run cd to see a list"}, // won't actually run, here just to show in docs
{"tz", tzCMD, "`zone` [24h]", "Set your IANA timezone (like tz Asia/Dubai) and optionally set 24h"},
{"nick", nickCMD, "`name`", "Change your username"},
{"prompt", promptCMD, "`prompt`", "Change your prompt. Run `man prompt` for more info"},
{"pronouns", pronounsCMD, "@user|pronouns", "Set your pronouns or get another user's"},
{"pronouns", pronounsCMD, "`@user`|`pronouns`", "Set your pronouns or get another user's"},
{"theme", themeCMD, "`name`|list", "Change the syntax highlighting theme"},
{"rest", commandsRestCMD, "", "Uncommon commands list"}}
RestCMDs = []CMD{
// {"people", peopleCMD, "", "See info about nice people who joined"},
{"bio", bioCMD, "[user]", "Get a user's bio or set yours"},
{"bio", bioCMD, "[`user`]", "Get a user's bio or set yours"},
{"id", idCMD, "`user`", "Get a unique ID for a user (hashed key)"},
{"admins", adminsCMD, "", "Print the ID (hashed key) for all admins"},
{"eg-code", exampleCodeCMD, "[big]", "Example syntax-highlighted code"},
{"lsbans", listBansCMD, "", "List banned IDs"},
{"ban", banCMD, "`user` [reason] [dur]", "Ban <user> and optionally, with a reason or duration (admin)"},
{"unban", unbanCMD, "`IP|ID` [dur]", "Unban a person (admin)"},
{"ban", banCMD, "`user` [`reason`] [`dur`]", "Ban <user> and optionally, with a reason or duration (admin)"},
{"unban", unbanCMD, "IP|ID [dur]", "Unban a person (admin)"},
{"kick", kickCMD, "`user`", "Kick <user> (admin)"},
{"art", asciiArtCMD, "", "Show some panda art"},
{"pwd", pwdCMD, "", "Show your current room"},
// {"sixel", sixelCMD, "<png url>", "Render an image in high quality"},
{"shrug", shrugCMD, "", `¯\\\_(ツ)\_/¯`}, // won't actually run, here just to show in docs
{"uname", unameCMD, "", "Show build info"},
{"uptime", uptimeCMD, "", "Show server uptime"},
{"8ball", EightBallCMD, "`question`", "Always tells the truth."},
{"8ball", eightBallCMD, "`question`", "Always tells the truth."},
}
SecretCMDs = []CMD{
{"ls", lsCMD, "???", "???"},
Expand Down Expand Up @@ -888,7 +888,7 @@ func neofetchCMD(_ string, u *User) {
u.room.broadcast("", result)
}

func EightBallCMD(_ string, u *User) {
func eightBallCMD(_ string, u *User) {
responses := []string{
"It is certain, ", "It is decidedly so, ", "Without a doubt, ", "Yes, definitely, ",
"You may rely on it, ", "As I see it, yes, ", "Most likely, ", "Outlook good, ",
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func autogenCommands(cmds []CMD) string {
b := new(bytes.Buffer)
w := tabwriter.NewWriter(b, 0, 0, 2, ' ', 0)
for _, cmd := range cmds {
w.Write([]byte(" " + cmd.name + "\t" + cmd.argsInfo + "\t_" + cmd.info + "_ \n")) //nolint:errcheck // bytes.Buffer is never going to err out
w.Write([]byte(" " + color.HiCyanString(cmd.name) + "\t" + cmd.argsInfo + "\t_" + cmd.info + "_ \n")) //nolint:errcheck // bytes.Buffer is never going to err out
}
w.Flush()
return b.String()
Expand Down

0 comments on commit 25a86b7

Please sign in to comment.