From 9eda93034a7b55ac6ab3dcfc4c776cf42cf90d0b Mon Sep 17 00:00:00 2001 From: Zane <90309290+Zingzy@users.noreply.github.com> Date: Mon, 5 Feb 2024 03:29:20 +0530 Subject: [PATCH] Update command descriptions --- cogs/getcode.py | 2 +- cogs/shorten.py | 2 +- main.py | 38 +++++++++++++++++++++++++++++++------- utils.py | 20 ++++++++++---------- 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/cogs/getcode.py b/cogs/getcode.py index ac96273..20df63a 100644 --- a/cogs/getcode.py +++ b/cogs/getcode.py @@ -9,7 +9,7 @@ def __init__(self, bot): @app_commands.command( name="get-code", - description="Get the code to use the https://spoo.me API in your preferred language", + description="Get the code to use the https://spoo.me API in your preferred language to shorten a URL 🔗", ) @app_commands.guild_only() @app_commands.choices( diff --git a/cogs/shorten.py b/cogs/shorten.py index fc939c8..b3a9492 100644 --- a/cogs/shorten.py +++ b/cogs/shorten.py @@ -29,7 +29,7 @@ def __init__(self, short_code): @app_commands.command( name="shorten", - description="Shorten a Long URL ✂️", + description="Shorten a Long URL 🤏🏻", ) @app_commands.describe( url="The URL to shorten", diff --git a/main.py b/main.py index 8a97363..a21bcd4 100644 --- a/main.py +++ b/main.py @@ -169,7 +169,10 @@ async def ping(ctx): print(e, file=sys.stdout) -@bot.hybrid_command(name="help", description="View the various commands of this bot") +@bot.hybrid_command( + name="help", + description="View the various commands of this bot 📃" +) async def help(ctx): user = bot.get_user(1202738385194717205) profilePicture = user.avatar.url @@ -178,6 +181,7 @@ async def help(ctx): title="SpooBot Commands", description="Here is the list of the available commands:", color=discord.Color.blurple(), + timestamp=ctx.message.created_at, ) embed.set_thumbnail(url=profilePicture) @@ -200,13 +204,14 @@ async def help(ctx): @bot.hybrid_command( name="invite", - description="Get the invite link for the bot", + description="Get the invite link for the bot 💌", ) async def invite(ctx): embed = discord.Embed( title="Invite SpooBot to your server!", description="Click [here](https://discord.com/api/oauth2/authorize?client_id=1202738385194717205&permissions=9242837113920&scope=bot) to invite SpooBot to your server!", color=discord.Color.orange(), + timestamp=ctx.message.created_at, ) try: @@ -225,18 +230,35 @@ async def invite(ctx): @bot.hybrid_command( name="bot-stats", - description="View the stats of the bot", + description="View the stats of the bot 👀", ) async def stats(ctx): + global start_time + + current_time = datetime.datetime.utcnow() + delta = current_time - start_time + + hours, remainder = divmod(int(delta.total_seconds()), 3600) + minutes, seconds = divmod(remainder, 60) + embed = discord.Embed( title="SpooBot Stats", description="Here are the stats of the bot:", color=discord.Color.og_blurple(), + timestamp=ctx.message.created_at, + ) + + embed.add_field(name="Servers", value=f"```{len(bot.guilds)}```", inline=True) + embed.add_field(name="Users", value=f"```{len(bot.users)}```", inline=True) + + embed.add_field( + name="Uptime", + value=f"```{hours} hours {minutes} minutes {seconds} seconds```", + inline=False, ) - embed.add_field(name="Servers", value=f"```{len(bot.guilds)}```", inline=False) - embed.add_field(name="Users", value=f"```{len(bot.users)}```", inline=False) - embed.add_field(name="Commands", value=f"```{len(commands_)}```", inline=False) + embed.add_field(name="Command Prefix", value=f"``` $ ```", inline=True) + embed.add_field(name="Total Commands", value=f"```{len(commands_)}```", inline=True) try: embed.set_footer( @@ -254,13 +276,14 @@ async def stats(ctx): @bot.hybrid_command( name="support", - description="Join the support server for the bot", + description="Join the Support Server of the bot 🛠️", ) async def support(ctx): embed = discord.Embed( title="Join the SpooBot Support Server!", description="Click https://spoo.me/discord to join the support server for SpooBot!", color=discord.Color.gold(), + timestamp=ctx.message.created_at, ) embed.set_thumbnail( @@ -291,6 +314,7 @@ async def about(ctx): description="```SpooBot is a URL shortener bot that makes your URLs spoo-tacular! 🎉 It is a bot that saves you time and hassle by shortening URLs for you, so you can focus on more important things! 😎\nBut wait, there's more! SpooBot also lets you view all your URL statistics from this bot, so you can track how many clicks, views, and visits your URLs get! 📈\nSpooBot is the ultimate URL shortener bot that you need in your life! 😍```", color=discord.Color.greyple(), url="https://spoo.me", + timestamp=ctx.message.created_at, ) embed.add_field( diff --git a/utils.py b/utils.py index eb626f5..2c608ae 100644 --- a/utils.py +++ b/utils.py @@ -8,8 +8,8 @@ "https://media2.giphy.com/media/QBd2kLB5qDmysEXre9/giphy.gif?cid=ecf05e47ha6xwa7rq38dcst49nefabwwrods631hvz67ptfg&ep=v1_gifs_search&rid=giphy.gif&ct=g", "https://media2.giphy.com/media/ZgqJGwh2tLj5C/giphy.gif?cid=ecf05e47gflyso481izbdcrw7y8okfkgdxgc7zoh34q9rxim&ep=v1_gifs_search&rid=giphy.gif&ct=g", "https://media0.giphy.com/media/EWhLjxjiqdZjW/giphy.gif?cid=ecf05e473fifxe2bg4act0zq73nkyjw0h69fxi52t8jt37lf&ep=v1_gifs_search&rid=giphy.gif&ct=g", - "https://media2.giphy.com/media/26BRuo6sLetdllPAQ/200w.webp", - "https://media4.giphy.com/media/tXL4FHPSnVJ0A/200w.webp", + "https://i.giphy.com/26BRuo6sLetdllPAQ.webp", + "https://i.giphy.com/tXL4FHPSnVJ0A.gif", ] welcome_gifs = [ @@ -31,18 +31,18 @@ commands_ = { " 🤏🏻 - With this command you can shorten your long urls.": """**Parameters:** - **url** - The url you want to shorten 🌐 -- **alias** - The custom alias you want to use for the url (optional) 🆔 -- **password** - The password you want to use for the url (optional) 🔑 -- **max_clicks** - The maximum number of clicks you want to allow for the url (optional) 🖱️""", +- **alias** - The custom alias you want to use for the url 🆔 +- **password** - The password you want to use for the url 🔑 +- **max_clicks** - The maximum number of clicks you want to allow for the url 🖱️""", " 😉 - With this command you can generate a short emoji link for your long boring urls.": """**Parameters:** - **url** - The url you want to shorten 🌐 -- **emojies** - The custom emojies you want to use for the url (optional) 😎 -- **password** - The password you want to use for the url (optional) 🔑 -- **max_clicks** - The maximum number of clicks you want to allow for the url (optional) 🖱️""", +- **emojies** - The custom emojies you want to use for the url 😎 +- **password** - The password you want to use for the url 🔑 +- **max_clicks** - The maximum number of clicks you want to allow for the url 🖱️""", " 📊 - With this command you can generate detailed statistical insights and charts of your shortened urls": """**Parameters:** - **short_code** - The short code of the url you want to get the stats for 🔢 -- **password** - The password of the url, if the url was password-protected (optional) 🔑""", - " 🧑🏻‍💻 - With this command you can get the code to use the spoo.me's official API in your own preferred language": """**Parameters:** +- **password** - The password of the url, if the url was password-protected 🔑""", + " 🧑🏻‍💻 - With this command you can get the code to use the spoo.me's official API in your own preferred language": """**Parameters:** - **language** - The language you want to get the code for. Available languages are: - All of the parameters as in the /shorten command""", " 🤖": "With this command you can get detailed information about the bot and the developer",