async def METHOD_NAME(member):
    """Sends the message for when a user joins or leave a guild"""
    config = await CustomJoinLeaveMessages.get_by(guild_id=member.guild.id)
    if len(config):
        channel = member.guild.get_channel(config[0].channel_id)
        if channel:
            embed = discord.Embed(color=0x00FF00)
            embed.set_author(name='Member Joined', icon_url=member.display_avatar.replace(format='png', size=32))
            embed.description = format_join_leave(config[0].join_message, member)
            embed.set_footer(text=f"{member.guild.name} | {member.guild.member_count} members")
            try:
                await channel.send(content=member.mention if config[0].ping else None, embed=embed)
            except discord.Forbidden:
                logger.warning(
                    f"Guild {member.guild}({member.guild.id}) has invalid permissions for join/leave logs")