Skip to content

Commit

Permalink
Merge pull request #55 from EncryptEx/restyled/FIX/metrics
Browse files Browse the repository at this point in the history
Restyle FIX: Added uurl length checking on metrics
  • Loading branch information
EncryptEx authored Sep 30, 2023
2 parents 57aa1c9 + ce71e02 commit ffedd07
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def filterMember(member: discord.Member):
:param member: discord.Member:
:param member: discord.Member:
:param member: discord.Member:
:param member: discord.Member:
"""
username, discriminator = str(member).split("#")
Expand Down Expand Up @@ -1492,7 +1493,8 @@ async def invite(ctx):
@option(
"value",
description="Select on/off",
autocomplete=discord.utils.basic_autocomplete(["on", "off", "en", "cat", "es"]),
autocomplete=discord.utils.basic_autocomplete(
["on", "off", "en", "cat", "es"]),
)
async def settings(ctx, module: str = None, value: str = None):
await SendMetric("settings")
Expand Down Expand Up @@ -1647,10 +1649,11 @@ async def metrics(ctx):
for cmd, times in commandDict.items()
]),
)
if(len(uurl) > 2048):
if len(uurl) > 2048:
embed.set_image(url=uurl)
else:
embed.add_field("Graph URL :link:", f"[Click Here to visualize](${uurl})")
else:
embed.add_field("Graph URL :link:",
f"[Click Here to visualize](${uurl})")
embed.set_footer(
text=await GetTranslatedText(ctx.guild.id,
"footer_executed_by",
Expand Down

0 comments on commit ffedd07

Please sign in to comment.