grim/wasdead

Don't output errors directly to the channel, commands should be handling that themselves
package discord
import (
"fmt"
"github.com/alecthomas/kong"
)
type HelpCmd struct {
Command []string `kong:"arg,optional,help='command to get help on'"`
}
func (c *HelpCmd) Run(g *Globals) error {
ctx, err := kong.Trace(g.ctx.Kong, c.Command)
if err != nil {
return err
}
if ctx.Error != nil {
return ctx.Error
}
err = ctx.PrintUsage(true)
if err != nil {
return err
}
fmt.Fprintln(g.ctx.Stdout)
return nil
}