From 986320abf293c1951f29233ece938db7a1b53458 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 29 Jun 2020 11:01:11 +0100 Subject: [PATCH] Storing some links within variables --- EnsoBot.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/EnsoBot.py b/EnsoBot.py index ac942b6c..c4c3f9b9 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -50,19 +50,20 @@ async def on_member_join(member): # Set the channel id to "general" general = client.get_channel(663651584399507481) + # Set the enso server icon and the welcoming gif + server_icon = "https://media.discordapp.net/attachments/683490529862090814/715010931620446269/image1.jpg?width=658&height=658" + welcome_gif = "https://cdn.discordapp.com/attachments/714671068941647933/717144047252275270/f4d7de6463d3ada02058a094fd6917ac.gif" + # Surround with try/except to catch any exceptions that may occur try: # Set up embed for the #newpeople channel embed = discord.Embed(title="\n**Welcome To Ensō!**", - colour=discord.Colour(0x30e419)) - - embed.timestamp = datetime.datetime.utcnow() + colour=discord.Colour(0x30e419), + timestamp=datetime.datetime.utcnow()) - embed.set_thumbnail(url="https://media.discordapp.net/attachments/683490529862090814/715010931620446269" - "/image1.jpg?width=658&height=658") - embed.set_image( - url="https://cdn.discordapp.com/attachments/714671068941647933/717144047252275270/f4d7de6463d3ada02058a094fd6917ac.gif") + embed.set_thumbnail(url=server_icon) + embed.set_image(url=welcome_gif) embed.add_field( name="\u200b", value=f"Hello {member.mention}! We hope you enjoy your stay in this server! ",