aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/doc/_cog.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py
index 603d7df97..933f4500e 100644
--- a/bot/exts/info/doc/_cog.py
+++ b/bot/exts/info/doc/_cog.py
@@ -454,5 +454,7 @@ class DocCog(commands.Cog):
@commands.has_any_role(*MODERATION_ROLES)
async def clear_cache_command(self, ctx: commands.Context, package_name: PackageName) -> None:
"""Clear the persistent redis cache for `package`."""
- await doc_cache.delete(package_name)
- await ctx.send(f"Successfully cleared the cache for `{package_name}`.")
+ if await doc_cache.delete(package_name):
+ await ctx.send(f"Successfully cleared the cache for `{package_name}`.")
+ else:
+ await ctx.send("No keys matching the package found.")