Skip to content

Commit

Permalink
Handle IndexError in !tg set-pl
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 30, 2019
1 parent 1986142 commit 8e20d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mautrix_telegram/commands/portal/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
async def set_power_level(evt: CommandEvent) -> EventID:
try:
level = int(evt.args[0])
except KeyError:
except (KeyError, IndexError):
return await evt.reply("**Usage:** `$cmdprefix+sp set-pl <level> [mxid]`")
except ValueError:
return await evt.reply("The level must be an integer.")
Expand Down

0 comments on commit 8e20d56

Please sign in to comment.