mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-21 03:57:26 +00:00
ManualParser commands can now have no arguments
This commit is contained in:
parent
0304ffaeb0
commit
95b6a1c0c9
|
@ -221,16 +221,6 @@ func (ctx *Context) callMessageCreate(mc *gateway.MessageCreateEvent) error {
|
|||
|
||||
// Check manual parser
|
||||
if cmd.Arguments[0].fn == nil {
|
||||
if len(args[start:]) == 0 {
|
||||
return &ErrInvalidUsage{
|
||||
Args: args,
|
||||
Prefix: ctx.Prefix,
|
||||
Index: len(args) - start,
|
||||
Err: "Not enough arguments given",
|
||||
Ctx: cmd,
|
||||
}
|
||||
}
|
||||
|
||||
// Create a zero value instance of this:
|
||||
v := reflect.New(cmd.Arguments[0].Type)
|
||||
|
||||
|
|
Loading…
Reference in a new issue