cogs/color/assignment.py
async def on_member_join(self, member):
        """Welcome and attempt to randomly color a new user."""

        # get required data
        wc, colors = db.get_many(member.guild.id, "wc", "colors")

        # do nothing if no welcome channel
        if not wc:
            return
        welcome_channel = member.guild.get_channel(wc)

        if colors:
            color = random.choice(colors)
            await self.color(member, color)
            accent = utils.discord_color(color)
        else:
            accent = discord.Colour.blurple()

        # generate and send weclome embed message
        embed = discord.Embed(
            title=f"{member.name} has joined the server!",
            description=f"Please give {member.mention} a warm welcome!",
            color=accent)
        embed.set_thumbnail(url=member.avatar_url)

        await welcome_channel.send(embed=embed)
Welcome and attempt to randomly color a new user.
Welcome and attempt to randomly color a new user.
Welcome and attempt to randomly color a new user .
async def on_member_join(self, member):
        wc, colors = db.get_many(member.guild.id, "wc", "colors")
        if not wc:
            return
        welcome_channel = member.guild.get_channel(wc)
        if colors:
            color = random.choice(colors)
            await self.color(member, color)
            accent = utils.discord_color(color)
        else:
            accent = discord.Colour.blurple()
        embed = discord.Embed(
            title=f"{member.name} has joined the server!",
            description=f"Please give {member.mention} a warm welcome!",
            color=accent)
        embed.set_thumbnail(url=member.avatar_url)
        await welcome_channel.send(embed=embed)
async def on_member_join ( self , member ) : wc , colors = db . get_many ( member . guild . id , "wc" , "colors" ) if not wc : return welcome_channel = member . guild . get_channel ( wc ) if colors : color = random . choice ( colors ) await self . color ( member , color ) accent = utils . discord_color ( color ) else : accent = discord . Colour . blurple ( ) embed = discord . Embed ( title = f"{member.name} has joined the server!" , description = f"Please give {member.mention} a warm welcome!" , color = accent ) embed . set_thumbnail ( url = member . avatar_url ) await welcome_channel . send ( embed = embed )
Welcome and attempt to randomly color a new user.
Welcome and attempt to randomly color a new user .
"""Welcome and attempt to randomly color a new user.""" # get required data # do nothing if no welcome channel # generate and send weclome embed message
self
member