diff --git a/plugins/autoclean.c b/plugins/autoclean.c index b7104fc7b..1da6c66e5 100644 --- a/plugins/autoclean.c +++ b/plugins/autoclean.c @@ -71,6 +71,7 @@ static void init(struct plugin_conn *prpc) static const struct plugin_command commands[] = { { "autocleaninvoice", + "payment", "Set up autoclean of expired invoices. ", "Perform cleanup every {cycle_seconds} (default 3600), or disable autoclean if 0. " "Clean up expired invoices that have expired for {expired_by} seconds (default 86400). ", diff --git a/plugins/libplugin.c b/plugins/libplugin.c index d52ba97a8..ea1e118b2 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -452,14 +452,16 @@ handle_getmanifest(struct command *getmanifest_cmd, for (size_t i = 0; i < num_commands; i++) { tal_append_fmt(¶ms, "{ 'name': '%s'," - " 'usage': '%s'," - " 'description': '%s'", + " 'category': '%s'," + " 'usage': '%s'," + " 'description': '%s'", commands[i].name, + commands[i].category, strmap_get(&usagemap, commands[i].name), commands[i].description); if (commands[i].long_description) tal_append_fmt(¶ms, - " 'long_description': '%s'", + " 'long_description': '%s'", commands[i].long_description); tal_append_fmt(¶ms, "}%s", i == num_commands - 1 ? "" : ",\n"); diff --git a/plugins/libplugin.h b/plugins/libplugin.h index 8364f1244..fc7ca1992 100644 --- a/plugins/libplugin.h +++ b/plugins/libplugin.h @@ -18,6 +18,7 @@ extern bool deprecated_apis; /* Create an array of these, one for each command you support. */ struct plugin_command { const char *name; + const char *category; const char *description; const char *long_description; struct command_result *(*handle)(struct command *cmd, diff --git a/plugins/pay.c b/plugins/pay.c index 4edb64b4a..99b698e6d 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1225,16 +1225,19 @@ static void init(struct plugin_conn *rpc) static const struct plugin_command commands[] = { { "pay", + "payment", "Send payment specified by {bolt11} with {amount}", "Try to send a payment, retrying {retry_for} seconds before giving up", json_pay }, { "paystatus", + "payment", "Detail status of attempts to pay {bolt11}, or all", "Covers both old payments and current ones.", json_paystatus }, { "listpays", + "payment", "List result of payment {bolt11}, or all", "Covers old payments (failed and succeeded) and current ones.", json_listpays