Browse Source

Add subcommand descriptions for guilds command. Fixes #19

Tulir Asokan 2 years ago
parent
commit
f99b7ce923
1 changed files with 16 additions and 3 deletions
  1. 16 3
      commands.go

+ 16 - 3
commands.go

@@ -307,20 +307,33 @@ var cmdGuilds = &commands.FullHandler{
 	RequiresLogin: true,
 }
 
+const smallGuildsHelp = "**Usage**: `$cmdprefix guilds <help/status/bridge/unbridge> [guild ID] [--entire]`"
+
+const fullGuildsHelp = smallGuildsHelp + `
+
+* **help** - View this help message.
+* **status** - View the list of guilds and their bridging status.
+* **bridge <_guild ID_> [--entire]** - Enable bridging for a guild. The --entire flag auto-creates portals for all channels.
+* **unbridge <_guild ID_>** - Unbridge a guild and delete all channel portal rooms.`
+
 func fnGuilds(ce *WrappedCommandEvent) {
 	if len(ce.Args) == 0 {
-		ce.Reply("**Usage**: `$cmdprefix guilds <status/bridge/unbridge> [guild ID] [--entire]`")
+		ce.Reply(fullGuildsHelp)
 		return
 	}
 	subcommand := strings.ToLower(ce.Args[0])
 	ce.Args = ce.Args[1:]
 	switch subcommand {
-	case "status":
+	case "status", "list":
 		fnListGuilds(ce)
 	case "bridge":
 		fnBridgeGuild(ce)
-	case "unbridge":
+	case "unbridge", "delete":
 		fnUnbridgeGuild(ce)
+	case "help":
+		ce.Reply(fullGuildsHelp)
+	default:
+		ce.Reply("Unknown subcommand `%s`\n\n"+smallGuildsHelp, subcommand)
 	}
 }