grim/wasdead
Clone
Summary
Browse
Changes
Graph
make the status command require a mention
draft
2019-06-08, Gary Kramlich
947250a2da50
make the status command require a mention
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
}