From 95b6a1c0c97c32501cebcc607d8ecaf03bf48b3b Mon Sep 17 00:00:00 2001 From: "diamondburned (Forefront)" Date: Sat, 25 Jan 2020 17:54:04 -0800 Subject: [PATCH] ManualParser commands can now have no arguments --- bot/ctx_call.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bot/ctx_call.go b/bot/ctx_call.go index 312eff0..46d08db 100644 --- a/bot/ctx_call.go +++ b/bot/ctx_call.go @@ -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)