Skip to content

Commit

Permalink
Merge pull request #148 from MiscGuild/bug-fix
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
Amxgh authored Sep 16, 2023
2 parents e105b5f + 57dcf02 commit 004946b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/cogs/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def gmember(self, ctx, name: str = None):
if isinstance(res, discord.Embed):
await ctx.respond(embed=res)
if isinstance(res, str):
await ctx.respond(res)
await ctx.respond(res, ephemeral=True)

@bridge.bridge_command(aliases=['weeklylb', 'wlb'])
async def weekly_gexp_lb(self, ctx):
Expand Down
2 changes: 1 addition & 1 deletion src/func/General.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def dnkllist(ctx):

async def rolecheck(ctx, send_ping: bool):
# Define a message for sending progress updates
progress_message = await ctx.send("Processing prerequisites...")
progress_message = await ctx.respond("Processing prerequisites...")

discord_members = bot.guild.members

Expand Down
21 changes: 12 additions & 9 deletions src/func/String.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def gmember(self, ctx):
weekly_gexp = sum(gexp_history.values())

# Send shortened version for non-command and non-ticket channels
if "commands" not in ctx.channel.name or ctx.channel.category not in ticket_categories.values():
if "commands" not in ctx.channel.name and str(ctx.channel.category) not in ticket_categories.values():
return f"__**{name}**__\n**Guild Experience -** `{format(weekly_gexp, ',d')}`"

week_dict = {
Expand Down Expand Up @@ -287,15 +287,18 @@ async def invites(self):
guild = await get_player_guild(uuid)
if guild["name"] != guild_handle:
return missing_permissions_embed
weekly_invites, total_invites, total_valid_invites = await get_invites(uuid)

weekly_invites = weekly_invites.split()
weekly_invites = [await get_name_by_uuid(invitee) for invitee in weekly_invites]
invites = ""
invites = await get_invites(uuid)
invites_text = ""
if not invites:
weekly_invites, total_invites, total_valid_invites = None, "0", "0"
else:
weekly_invites, total_invites, total_valid_invites = invites
weekly_invites = weekly_invites.split()
weekly_invites = [await get_name_by_uuid(invitee) for invitee in weekly_invites]
for invitee in weekly_invites:
invites_text += f"**▸** {invitee}\n"
embed = discord.Embed(title=f"{ign}'s Invites", color=neutral_color)
for invitee in weekly_invites:
invites += f"**▸** {invitee}\n"
embed.add_field(name="Weekly Invites", value=invites, inline=False)
embed.add_field(name="Weekly Invites", value=None if not invites_text else invites_text, inline=False)
embed.add_field(name="Total Invites", value=total_invites, inline=True)
embed.add_field(name="Total Valid Invites", value=total_valid_invites, inline=True)
embed.set_footer(text="Total invites and total valid invites do not include this week's invites. They are "
Expand Down
2 changes: 1 addition & 1 deletion src/utils/referral_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ async def generate_rank_upgrade(weekly_invites: list):
- Total unscaled guild experience earned - `{format(total_gexp, ',d')}`
- Total players invited - `{format(total_invitations, ',d')}`
*To know how the winner is picked, go here ASHGFAJHSFKJAHSFLAHl*'''
*To know how the winner is picked, go here https://discord.com/channels/522586672148381726/1152480866585554994/1152521488356872222*'''

await bot.get_channel(rank_upgrade_channel).send(announcement)

0 comments on commit 004946b

Please sign in to comment.