Spaces:
Sleeping
Sleeping
Rifat Azad commited on
Commit ·
b5f3a1a
1
Parent(s): 1d2668d
updated version command format
Browse files- pydvpl_bot.py +33 -13
pydvpl_bot.py
CHANGED
|
@@ -36,7 +36,7 @@ load_dotenv()
|
|
| 36 |
# DEFINES ------------------------------------------------------ START
|
| 37 |
|
| 38 |
|
| 39 |
-
BOT_VERSION = '1.4.
|
| 40 |
|
| 41 |
AUTHORIZED_USER_ID = os.getenv('AUTHORIZED_ID')
|
| 42 |
|
|
@@ -687,23 +687,43 @@ async def uptime(ctx):
|
|
| 687 |
async def version(ctx):
|
| 688 |
# Create an embed message to display the bot version
|
| 689 |
embed = discord.Embed(
|
| 690 |
-
title="
|
| 691 |
-
description=
|
| 692 |
-
color=discord.Color.
|
| 693 |
)
|
| 694 |
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 699 |
-
|
| 700 |
-
embed.add_field(name="Craiyon Lib Version:", value=f"``{craiyon.__version__}``", inline=False)
|
| 701 |
|
| 702 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
embed.timestamp = ctx.message.created_at
|
| 704 |
-
|
| 705 |
# Send the embed message
|
| 706 |
-
await ctx.reply(embed=embed)
|
|
|
|
|
|
|
| 707 |
|
| 708 |
#await ctx.reply(f"The command `version` was executed by - {ctx.author.mention}")
|
| 709 |
|
|
|
|
| 36 |
# DEFINES ------------------------------------------------------ START
|
| 37 |
|
| 38 |
|
| 39 |
+
BOT_VERSION = '1.4.2'
|
| 40 |
|
| 41 |
AUTHORIZED_USER_ID = os.getenv('AUTHORIZED_ID')
|
| 42 |
|
|
|
|
| 687 |
async def version(ctx):
|
| 688 |
# Create an embed message to display the bot version
|
| 689 |
embed = discord.Embed(
|
| 690 |
+
title="Bot Version",
|
| 691 |
+
description="The current version of the bot and its dependencies.",
|
| 692 |
+
color=discord.Color.gold() # Changed color to gold for a more visually appealing look
|
| 693 |
)
|
| 694 |
|
| 695 |
+
bot_ver = {
|
| 696 |
+
f"PyDVPL Bot Version": f"{BOT_VERSION}",
|
| 697 |
+
}
|
| 698 |
+
|
| 699 |
+
bot_ver_formatted = "\n".join([f"```{name}: {value}```" for name, value in bot_ver.items()])
|
|
|
|
| 700 |
|
| 701 |
+
# Bot version
|
| 702 |
+
embed.add_field(name="**CORE**", value=bot_ver_formatted, inline=False) # Changed to bold and capitalized "CORE"
|
| 703 |
+
|
| 704 |
+
# Add dependencies as child fields
|
| 705 |
+
dependencies = {
|
| 706 |
+
f"PyDVPL Lib Version": f"{pydvpl.version.__version__}",
|
| 707 |
+
f"LZ4 PY Lib Version": f"{__LZ4_VERSION__}",
|
| 708 |
+
f"Discord PY Version": f"{discord.__version__}",
|
| 709 |
+
f"PyTGPT Lib Version": f"{pytgpt.__version__}",
|
| 710 |
+
f"Craiyon Lib Version": f"{craiyon.__version__}"
|
| 711 |
+
}
|
| 712 |
+
|
| 713 |
+
# Format and layout dependencies
|
| 714 |
+
dependencies_formatted = "\n".join([f"```{name}: {value}```" for name, value in dependencies.items()])
|
| 715 |
+
embed.add_field(name="**DEPENDENCIES**", value=dependencies_formatted, inline=False) # Changed to bold and capitalized "DEPENDENCIES"
|
| 716 |
+
|
| 717 |
+
embed.set_footer(
|
| 718 |
+
text=f"Requested by {ctx.author.display_name}",
|
| 719 |
+
icon_url=ctx.author.display_avatar.url if ctx.author.display_avatar else discord.Embed.Empty
|
| 720 |
+
)
|
| 721 |
embed.timestamp = ctx.message.created_at
|
| 722 |
+
|
| 723 |
# Send the embed message
|
| 724 |
+
await ctx.reply(embed=embed)
|
| 725 |
+
|
| 726 |
+
|
| 727 |
|
| 728 |
#await ctx.reply(f"The command `version` was executed by - {ctx.author.mention}")
|
| 729 |
|