title: Creating a custom image welcome banner in Discord
body: <p>So I am currently trying to create a Discord bot that creates a custom welcome image when someone joins the server. However, there is no output on the image selected and there are no error outputs whenever I run the bot. I assumed I did not enable Privileged Intents but I have so I am stuck as to why it is not outputting anything when I log into my test server using my test account! You can find my code below :</p>
  <pre><code>#importing dependencies
  
  import numpy as np
  import logging
  import discord
  import PIL
  import asyncio
  import os
  
  #importing commands from above dependencies
  
  from discord import client
  from discord.ext import commands
  from PIL import Image, ImageFont, ImageDraw
  from discord.member import Member
  
  #enabling privileged intents
  
  intents = discord.Intents.default()
  intents.members = True
  intents.presences = True
  client = discord.Client(intents=intents)
  
  #for custom image welcome message
  
  @client.event
  async def on_member_join(ctx, member: discord.Member = None):
  
      if member == None:
          member = ctx.author
      channel = client.get_channel(&quot;TOKEN&quot;)
  
      #-----------------------------------------------------------------------------#   
  
      #transforming user's avatar into a circle
  
      # Open the input image as numpy array, convert to RGB
      img=Image.open(member.avatar_url).convert(&quot;RGB&quot;)
      npImage=np.array(img)
      h,w=img.size
  
      # Create same size alpha layer with circle
      alpha = Image.new('L', img.size,0)
      draw = ImageDraw.Draw(alpha)
      draw.pieslice([0,0,h,w],0,360,fill=255)
  
      # Convert alpha Image to numpy array
      npAlpha=np.array(alpha)
  
      # Add alpha layer to RGB
      npImage=np.dstack((npImage,npAlpha))
  
      # Save with alpha
      Image.fromarray(npImage).save(&quot;D:\Coding\Python\Projects\discord_moderation_bot\imgs\result.png&quot;)
      
      #-----------------------------------------------------------------------------#
      
      #pasting user avatar into welcome banner
      
      img = Image.open(&quot;D:\Coding\Python\Projects\discord_moderation_bot\imgs\welcome_banner.png&quot;)
      pfp = Image.open(&quot;D:\Coding\Python\Projects\discord_moderation_bot\imgs\result.png&quot;)
      
      pfp = pfp.resize ((167, 167))
  
      img.paste(pfp, (120, 104))
  
      img.save(&quot;D:\Coding\Python\Projects\discord_moderation_bot\imgs\welcome.jpg&quot;)
  
      await ctx.send(file = discord.File(&quot;welcome.jpg&quot;))
  
  
  client.run(&quot;TOKEN&quot;)
  </code></pre>
  <p>Thanks in advance!</p>