Ensure login-token is given enough parameters

This commit is contained in:
Tulir Asokan
2022-11-11 14:34:45 +02:00
parent f53975cc91
commit f424838f0b

View File

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