1
0
Fork 0
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:
diamondburned (Forefront) 2020-01-25 17:54:04 -08:00
parent 0304ffaeb0
commit 95b6a1c0c9

View file

@ -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)