Rifat Azad commited on
Commit
b5f3a1a
1 Parent(s): 1d2668d

updated version command format

Browse files
Files changed (1) hide show
  1. 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.1'
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="Version Info",
691
- description=f"The current version of libraries used in `PyDVPL`.",
692
- color=discord.Color.yellow()
693
  )
694
 
695
- embed.add_field(name="PyDVPL Bot Version:", value=f"``{BOT_VERSION}``", inline=False)
696
- embed.add_field(name="PyDVPL Lib Version:", value=f"``{pydvpl.version.__version__}``", inline=False)
697
- embed.add_field(name="LZ4 PY Lib Version:", value=f"``{__LZ4_VERSION__}``", inline=False)
698
- embed.add_field(name="Discord PY Version:", value=f"``{discord.__version__}``", inline=False)
699
- embed.add_field(name="PyTGPT Lib Version:", value=f"``{pytgpt.__version__}``", inline=False)
700
- embed.add_field(name="Craiyon Lib Version:", value=f"``{craiyon.__version__}``", inline=False)
701
 
702
- embed.set_footer(text=f"Requested by {ctx.author.display_name}", icon_url=ctx.author.display_avatar.url if ctx.author.display_avatar else discord.Embed.Empty)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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