recruitment/cr.py
async def waiting_list(self, ctx: commands.Context):
        """Show status of the waiting list."""
        message = ""
        num_clans = 0
        num_players = 0

        async with ctx.channel.typing():

            embed = discord.Embed(color=discord.Colour.blue())

            for clan_name, clan_data in self.family_clans.items():
                if len(clan_data.get("waiting", {})) > 0:
                    num_clans += 1
                    message = ""
                    for index, user_ID in enumerate(clan_data.get("waiting", {})):
                        user = discord.utils.get(ctx.guild.members, id=user_ID)
                        try:
                            message += str(index + 1) + ". " + user.display_name + "\n"
                            num_players += 1
                        except AttributeError:
                            await self.remove_from_waiting(clan_name, user_ID)
                            message += f"{str(index+1)}.*user {user_ID} not found*\n"
                    embed.add_field(name=clan_name, value=message, inline=False)

        if not message:
            return await ctx.send("The waiting list is empty.")
        else:
            embed.description = (
                "We have "
                + str(num_players)
                + " people waiting for "
                + str(num_clans)
                + " clans."
            )
            embed.set_author(
                name="Legend Family Waiting List",
                icon_url="https://cdn.discordapp.com/attachments/423094817371848716/425389610223271956/legend_logo-trans.png",
            )
            embed.set_footer(text=credits, icon_url=credits_icon)
            return await ctx.send(embed=embed)
Show status of the waiting list.
Show status of the waiting list.
Show status of the waiting list .
async def waiting_list(self, ctx: commands.Context):
        message = ""
        num_clans = 0
        num_players = 0
        async with ctx.channel.typing():
            embed = discord.Embed(color=discord.Colour.blue())
            for clan_name, clan_data in self.family_clans.items():
                if len(clan_data.get("waiting", {})) > 0:
                    num_clans += 1
                    message = ""
                    for index, user_ID in enumerate(clan_data.get("waiting", {})):
                        user = discord.utils.get(ctx.guild.members, id=user_ID)
                        try:
                            message += str(index + 1) + ". " + user.display_name + "\n"
                            num_players += 1
                        except AttributeError:
                            await self.remove_from_waiting(clan_name, user_ID)
                            message += f"{str(index+1)}.*user {user_ID} not found*\n"
                    embed.add_field(name=clan_name, value=message, inline=False)
        if not message:
            return await ctx.send("The waiting list is empty.")
        else:
            embed.description = (
                "We have "
                + str(num_players)
                + " people waiting for "
                + str(num_clans)
                + " clans."
            )
            embed.set_author(
                name="Legend Family Waiting List",
                icon_url="https://cdn.discordapp.com/attachments/423094817371848716/425389610223271956/legend_logo-trans.png",
            )
            embed.set_footer(text=credits, icon_url=credits_icon)
            return await ctx.send(embed=embed)
async def waiting_list ( self , ctx : commands . Context ) : message = "" num_clans = 0 num_players = 0 async with ctx . channel . typing ( ) : embed = discord . Embed ( color = discord . Colour . blue ( ) ) for clan_name , clan_data in self . family_clans . items ( ) : if len ( clan_data . get ( "waiting" , { } ) ) > 0 : num_clans += 1 message = "" for index , user_ID in enumerate ( clan_data . get ( "waiting" , { } ) ) : user = discord . utils . get ( ctx . guild . members , id = user_ID ) try : message += str ( index + 1 ) + ". " + user . display_name + "\n" num_players += 1 except AttributeError : await self . remove_from_waiting ( clan_name , user_ID ) message += f"{str(index+1)}.*user {user_ID} not found*\n" embed . add_field ( name = clan_name , value = message , inline = False ) if not message : return await ctx . send ( "The waiting list is empty." ) else : embed . description = ( "We have " + str ( num_players ) + " people waiting for " + str ( num_clans ) + " clans." ) embed . set_author ( name = "Legend Family Waiting List" , icon_url = "https://cdn.discordapp.com/attachments/423094817371848716/425389610223271956/legend_logo-trans.png" , ) embed . set_footer ( text = credits , icon_url = credits_icon ) return await ctx . send ( embed = embed )
Show status of the waiting list.
Show status of the waiting list .
"""Show status of the waiting list."""
self
ctx
commands.Context