Browse Source

Ensure login-token is given enough parameters

Tulir Asokan 2 năm trước cách đây
mục cha
commit
f424838f0b
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      commands.go

+ 4 - 0
commands.go

@@ -75,6 +75,10 @@ var cmdLoginToken = &commands.FullHandler{
 }
 
 func fnLoginToken(ce *WrappedCommandEvent) {
+	if len(ce.Args) == 0 {
+		ce.Reply("**Usage**: `$cmdprefix login-token <token>`")
+		return
+	}
 	ce.MarkRead()
 	defer ce.Redact()
 	if ce.User.IsLoggedIn() {