diff --git a/matrix_appservice_kakaotalk/commands/auth.py b/matrix_appservice_kakaotalk/commands/auth.py index e746f7d..6b76e62 100644 --- a/matrix_appservice_kakaotalk/commands/auth.py +++ b/matrix_appservice_kakaotalk/commands/auth.py @@ -69,8 +69,13 @@ async def login(evt: CommandEvent) -> None: await evt.reply("You're already logged in") return - save = len(evt.args) > 0 and evt.args[0] == "--save" - email = evt.args[0 if not save else 1] if len(evt.args) > 0 else None + num_args = len(evt.args) + save = num_args > 0 and evt.args[0] == "--save" + # TODO Once web login is implemented, don't make a mandatory argument + if not save and num_args != 1: + await evt.reply("**Usage:** `$cmdprefix+sp login [--save] `") + return + email = evt.args[0 if not save else 1] if num_args > 0 else None if email: evt.sender.command_status = {