mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-30 18:53:30 +00:00
Bot: Variadic arguments are now ellipsized in help
This commit is contained in:
parent
b122aa6561
commit
cf48bd8543
|
@ -265,6 +265,11 @@ func (sub *Subcommand) Help(indent string, hideAdmin bool) string {
|
||||||
commands += " " + underline(usage)
|
commands += " " + underline(usage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is the last argument trailing? If so, append ellipsis.
|
||||||
|
if cmd.Variadic {
|
||||||
|
commands += "..."
|
||||||
|
}
|
||||||
|
|
||||||
// Write the description if there's any.
|
// Write the description if there's any.
|
||||||
if cmd.Description != "" {
|
if cmd.Description != "" {
|
||||||
commands += ": " + cmd.Description
|
commands += ": " + cmd.Description
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package bot
|
package bot
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
func TestNewSubcommand(t *testing.T) {
|
func TestNewSubcommand(t *testing.T) {
|
||||||
_, err := NewSubcommand(&testc{})
|
_, err := NewSubcommand(&testc{})
|
||||||
|
|
Loading…
Reference in a new issue