mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 17:23:00 +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)
|
||||
}
|
||||
|
||||
// Is the last argument trailing? If so, append ellipsis.
|
||||
if cmd.Variadic {
|
||||
commands += "..."
|
||||
}
|
||||
|
||||
// Write the description if there's any.
|
||||
if cmd.Description != "" {
|
||||
commands += ": " + cmd.Description
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package bot
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewSubcommand(t *testing.T) {
|
||||
_, err := NewSubcommand(&testc{})
|
||||
|
|
Loading…
Reference in a new issue