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

FIX: Added uurl length checking on metrics #54

Merged
merged 33 commits into from
Sep 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
57aa1c9
added metrics uurl fix
EncryptEx Sep 30, 2023
11239cf
Restyled by autopep8
restyled-commits Sep 30, 2023
ef3c882
Restyled by black
restyled-commits Sep 30, 2023
1d975a0
Restyled by isort
restyled-commits Sep 30, 2023
708bfa9
Restyled by pyment
restyled-commits Sep 30, 2023
931c88a
Restyled by reorder-python-imports
restyled-commits Sep 30, 2023
fcc0a45
Restyled by whitespace
restyled-commits Sep 30, 2023
ce71e02
Restyled by yapf
restyled-commits Sep 30, 2023
ffedd07
Merge pull request #55 from EncryptEx/restyled/FIX/metrics
EncryptEx Sep 30, 2023
145c655
added encoded in b64 the uurl
EncryptEx Sep 30, 2023
5168f54
Merge branch 'FIX/metrics' of https://github.com/encryptex/hammer int…
EncryptEx Sep 30, 2023
65a5acb
fixed condifiton of if
EncryptEx Sep 30, 2023
0c0d24f
fixed add field requirements
EncryptEx Sep 30, 2023
bf1175b
created a partition message system
EncryptEx Sep 30, 2023
950fb4f
Restyled by autopep8
restyled-commits Sep 30, 2023
7dbdbb9
Restyled by black
restyled-commits Sep 30, 2023
a536be8
Restyled by isort
restyled-commits Sep 30, 2023
b8fac5f
Restyled by pyment
restyled-commits Sep 30, 2023
6775cdd
Restyled by reorder-python-imports
restyled-commits Sep 30, 2023
06fc9b1
Restyled by whitespace
restyled-commits Sep 30, 2023
e75fac8
Restyled by yapf
restyled-commits Sep 30, 2023
00b4601
Merge pull request #56 from EncryptEx/restyled/FIX/metrics
EncryptEx Sep 30, 2023
79c85ce
Restyled by autopep8
restyled-commits Sep 30, 2023
4ac78e0
Restyled by black
restyled-commits Sep 30, 2023
81b3600
Restyled by isort
restyled-commits Sep 30, 2023
4057dd5
Restyled by pyment
restyled-commits Sep 30, 2023
cb36b43
Restyled by reorder-python-imports
restyled-commits Sep 30, 2023
ef5cbea
Restyled by whitespace
restyled-commits Sep 30, 2023
13d056d
Restyled by yapf
restyled-commits Sep 30, 2023
742d205
Merge pull request #57 from EncryptEx/restyled/FIX/metrics
EncryptEx Sep 30, 2023
dd112ef
fixed restyled bug
EncryptEx Sep 30, 2023
72073bb
Merge branch 'FIX/metrics' of https://github.com/encryptex/hammer int…
EncryptEx Sep 30, 2023
23fd679
delete useless comment
EncryptEx Sep 30, 2023
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
Prev Previous commit
Next Next commit
Restyled by autopep8
  • Loading branch information
restyled-commits committed Sep 30, 2023
commit 950fb4fd802037b3c73f72680178e9fdbaf61d0b
23 changes: 8 additions & 15 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ def ErrorEmbed(error):
embed = Embed(title=f":no_entry_sign: Error!", description=error)

embed.set_thumbnail(
url=
"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ficonsplace.com%2Fwp-content%2Fuploads%2F_icons%2Fff0000%2F256%2Fpng%2Ferror-icon-14-256.png&f=1&nofb=1"
url="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ficonsplace.com%2Fwp-content%2Fuploads%2F_icons%2Fff0000%2F256%2Fpng%2Ferror-icon-14-256.png&f=1&nofb=1"
)

embed.set_footer(
Expand Down Expand Up @@ -931,8 +930,7 @@ async def warn(ctx,
@bot.slash_command(
guild_only=True,
name="softwarn",
description=
"Sets a silent warning for a user, at 3 warns/strikes they get kicked",
description="Sets a silent warning for a user, at 3 warns/strikes they get kicked",
)
@discord.default_permissions(administrator=True, )
async def softwarn(ctx, member: discord.Member, reason=None):
Expand Down Expand Up @@ -1254,8 +1252,7 @@ async def restart(ctx):
@bot.slash_command(
guild_only=True,
name="setdelay",
description=
"Updates the message delay in a channel with a set of custom time interval",
description="Updates the message delay in a channel with a set of custom time interval",
)
@discord.default_permissions(manage_messages=True, )
async def setdelay(ctx, seconds: float, reason: str = ""):
Expand Down Expand Up @@ -1340,8 +1337,7 @@ async def mute(ctx, member: discord.Member, *, reason=None):
@bot.slash_command(
guild_only=True,
name="unmute",
description=
"Restores the hability to talk or join voice channels to a user",
description="Restores the hability to talk or join voice channels to a user",
)
@discord.default_permissions(manage_messages=True, )
async def unmute(ctx, member: discord.Member, *, reason=None):
Expand Down Expand Up @@ -1407,8 +1403,7 @@ async def lock(ctx, channel: discord.TextChannel = None, reason=None):
@bot.slash_command(
guild_only=True,
name="unlock",
description=
"Removes the blocking in a channel from not being used as a chat.",
description="Removes the blocking in a channel from not being used as a chat.",
)
async def unlock(ctx, channel: discord.TextChannel = None, reason=None):
await SendMetric("unlock")
Expand Down Expand Up @@ -1441,8 +1436,7 @@ async def unlock(ctx, channel: discord.TextChannel = None, reason=None):
async def suggest(ctx, suggestion: str):
await SendMetric("suggest")
embed = Embed(
title=
f"The user {filterMember(ctx.author)} has posted a suggestion! :hammer_pick:",
title=f"The user {filterMember(ctx.author)} has posted a suggestion! :hammer_pick:",
description=f"{suggestion}",
)
embed.set_footer(
Expand All @@ -1467,8 +1461,7 @@ async def invite(ctx):
await SendMetric("invite")
embed = Embed(
title=await GetTranslatedText(ctx.guild.id, "hammer_invite"),
description=
f"[**🔗{await GetTranslatedText(ctx.guild.id, 'hammer_link')}**](https://discordapp.com/api/oauth2/authorize?client_id=591633652493058068&permissions=8&scope=bot)",
description=f"[**🔗{await GetTranslatedText(ctx.guild.id, 'hammer_link')}**](https://discordapp.com/api/oauth2/authorize?client_id=591633652493058068&permissions=8&scope=bot)",
)
embed.set_footer(
text=await GetTranslatedText(ctx.guild.id,
Expand Down Expand Up @@ -1652,7 +1645,7 @@ async def metrics(ctx):
)
if len(uurl) < 2048:
embed.set_image(url=uurl)
else:
else:
rest = uurl
i = 1020
while (len(rest) > 0):
Expand Down