Skip to content

Commit

Permalink
Fixed Major bug with verification not giving guild members the guild …
Browse files Browse the repository at this point in the history
…role automatically.
  • Loading branch information
KevinTrinh1227 committed Nov 12, 2023
1 parent 4736153 commit 3d45943
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commands/force_player_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async def forceverify(self, ctx, user: discord.Member, username: str):
ign = ign,
guild_rank = user_rank
)
await user.add_roles(verified_linked_role) # gives user guild role
await user.add_roles(guild_role) # gives user guild role

else:
pass
Expand Down
4 changes: 3 additions & 1 deletion commands/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
embed_color = int(data["general"]["embed_color"].strip("#"), 16) #convert hex color to hexadecimal format
unverified_role_id = int(data["role_ids"]["unverified_member"])
verified_role_id = int(data["role_ids"]["verified_member"])
guild_role_id = int(data["role_ids"]["guild_member"])
font_title = ImageFont.truetype("./assets/fonts/Minecraft.ttf", 16)
font_footer = ImageFont.truetype("./assets/fonts/Minecraft.ttf", 13)

Expand Down Expand Up @@ -102,6 +103,7 @@ async def verify(self, ctx, *, username):

unverified_role = discord.utils.get(ctx.guild.roles, id=unverified_role_id) #default role id
verified_linked_role = discord.utils.get(ctx.guild.roles, id=verified_role_id) #verified role id
guild_role = discord.utils.get(ctx.guild.roles, id=guild_role_id) #verified role id

#checks if user is in a guild
try:
Expand All @@ -122,7 +124,7 @@ async def verify(self, ctx, *, username):
ign = ign,
guild_rank = user_rank
)
await ctx.author.add_roles(verified_linked_role) # gives user guild role
await ctx.author.add_roles(guild_role) # gives user guild role

else:
pass
Expand Down
2 changes: 1 addition & 1 deletion listeners/member_data_cacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def guildMemberCacher(self):

channel = self.client.get_channel(logs_channel_id)
embed = discord.Embed(
title=(f"😊 | {ign} has just joined the guild!."),
title=(f"😊 | {ign} has just joined the guild!"),
description=f"Player `{ign}` was just loaded into the guild cache. This means that they either just joined or was just now loaded. Their username will now appear in all guild commands.",
colour= embed_color
)
Expand Down

0 comments on commit 3d45943

Please sign in to comment.