Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##When a user joins, assign a role and welcome.
- @client.event
- async def on_member_join(member):
- ##Messaging user
- frames = []
- count = 0
- while True:
- image = Image.open("/Users/Administrator/Desktop/Nebula/Assets/InGif1.gif")
- try:
- image.seek(count)
- except EOFError:
- break
- #new image for each frame of gif
- newPic = Image.new("RGB", image.size) #color channels can be other like RGBA, binary, grayscale, etc
- newPic.paste(image)
- font_type = ImageFont.truetype("/Users/Administrator/Desktop/Nebula/Assets/coolvetica.ttf", 15)
- draw = ImageDraw.Draw(newPic)
- draw.text(xy=(50,215), text=" Welcome to The Nebula \"{0}\"!!".format(str(member)[:-5]), fill=(35,129,192), font=font_type)
- draw.text(xy=(125,230), text=" We hope you enjoy your stay! ", fill=(35,129,192), font=font_type)
- cvImg = numpy.array(newPic)
- frames.append(cvImg)
- count += 1
- imageio.mimsave("/Users/Administrator/Desktop/Nebula/Assets/OutGif1.gif", frames)
- embed = discord.Embed (
- title = "Welcome!",
- description = "***★彡 You Are Now Stepping Inside The Wormhole 彡★ ***",
- colour = discord.Colour.teal()
- )
- await client.send_message(member, embed=embed)
- await client.send_file(member, "/Users/Administrator/Desktop/Nebula/Assets/OutGif1.gif")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement