diff --git a/mautrix_telegram/commands/portal/admin.py b/mautrix_telegram/commands/portal/admin.py index 4815eb28..52197008 100644 --- a/mautrix_telegram/commands/portal/admin.py +++ b/mautrix_telegram/commands/portal/admin.py @@ -52,7 +52,7 @@ async def set_power_level(evt: CommandEvent) -> Dict: async def clear_db_cache(evt: CommandEvent) -> Dict: try: section = evt.args[0].lower() - except KeyError: + except IndexError: return await evt.reply("**Usage:** `$cmdprefix+sp clear-db-cache
`") if section == "portal": po.Portal.by_tgid = {}