aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities/wtf_python.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/utilities/wtf_python.py')
-rw-r--r--bot/exts/utilities/wtf_python.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/bot/exts/utilities/wtf_python.py b/bot/exts/utilities/wtf_python.py
index 66a022d7..980b3dba 100644
--- a/bot/exts/utilities/wtf_python.py
+++ b/bot/exts/utilities/wtf_python.py
@@ -79,7 +79,7 @@ class WTFPython(commands.Cog):
return match if certainty > MINIMUM_CERTAINTY else None
@commands.command(aliases=("wtf", "WTF"))
- async def wtf_python(self, ctx: commands.Context, *, query: str) -> None:
+ async def wtf_python(self, ctx: commands.Context, *, query: Optional[str] = None) -> None:
"""
Search WTF Python repository.
@@ -87,6 +87,18 @@ class WTFPython(commands.Cog):
Usage:
--> .wtf wild imports
"""
+ if query is None:
+ no_query_embed = Embed(
+ title="WTF Python?!",
+ colour=constants.Colours.dark_green,
+ description="A repository filled with suprising snippets that can make you say WTF?!\n\n"
+ f"[Go to the Repository]({BASE_URL})"
+ )
+ logo = File(LOGO_PATH, filename="wtf_logo.jpg")
+ no_query_embed.set_thumbnail(url="attachment://wtf_logo.jpg")
+ await ctx.send(embed=no_query_embed, file=logo)
+ return
+
if len(query) > 50:
embed = Embed(
title=random.choice(constants.ERROR_REPLIES),