Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle FIX: Added uurl length checking on metrics #55

Merged
merged 7 commits into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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