From aec4fed37c6cece81216f16a041bdf2b63c252a2 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 6 Jun 2020 20:02:22 +0100 Subject: [PATCH] Adding timestamp embed into the embed messages --- EnsoBot.py | 3 +++ cogs/FunCommands.py | 2 ++ cogs/HelpCommands.py | 12 ++++++++---- cogs/WaifuImages.py | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/EnsoBot.py b/EnsoBot.py index a87efc14..020ac1e1 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -1,4 +1,5 @@ import asyncio +import datetime import discord from decouple import config @@ -42,6 +43,8 @@ async def roles(ctx): colour=discord.Colour(0x30e419), description="------------------------------------------------") + embed.timestamp = datetime.datetime.utcnow() + embed.set_image(url="https://media.discordapp.net/attachments/669812887564320769/717149671771996180/unknown.png") embed.set_thumbnail(url="https://cdn.discordapp.com/attachments/683490529862090814/715010931620446269/image1.jpg") embed.set_author(name="Hamothy", diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 3a655a77..769665e2 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -1,4 +1,5 @@ import asyncio +import datetime import random import discord @@ -116,6 +117,7 @@ class Fun(commands.Cog): colour=discord.Colour(int(random.choice(colours)))) embed.set_image(url=random.choice(kissing_array)) embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) + embed.timestamp = datetime.datetime.utcnow() await ctx.send(embed=embed) diff --git a/cogs/HelpCommands.py b/cogs/HelpCommands.py index 17a974a2..40637299 100644 --- a/cogs/HelpCommands.py +++ b/cogs/HelpCommands.py @@ -26,12 +26,14 @@ class CustomHelp(commands.Cog): embed.add_field( name="\u200b", - value="```( ͡°ω ͡°) Waifu/Husbando Commands ( ͡°ω ͡°)```", + value="```css" + + "\n ( ͡°ω ͡°) Waifu/Husbando Commands ( ͡°ω ͡°)" + + "```", inline=False) embed.add_field( name="\u200b\u200b", - value="**➳ ~ping**" + - "\n Returns Pong! Along With The Latency in ms", + value="**➳ ~kakashi**" + + "\n Allows for a randomly generated image of Hatake Kakashi", inline=True) embed.add_field( name="\u200b", @@ -45,7 +47,9 @@ class CustomHelp(commands.Cog): inline=True) embed.add_field( name="\u200b", - value="```( ͡°ω ͡°) Misc Commands ( ͡°ω ͡°)```", + value="```css" + + "\n ( ͡°ω ͡°) Misc Commands ( ͡°ω ͡°)" + + "```", inline=False) embed.add_field( name="\u200b\u200b", diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index 8263606e..abef74bc 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -1,4 +1,5 @@ import asyncio +import datetime import random import discord @@ -37,6 +38,7 @@ class Waifus(commands.Cog): embed = discord.Embed(title="**Hatake Kakashi**", colour=discord.Colour(random.choice(colours))) embed.set_image(url=random.choice(kakashi_array)) embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) + embed.timestamp = datetime.datetime.utcnow() await ctx.send(embed=embed) else: @@ -67,6 +69,7 @@ class Waifus(commands.Cog): embed = discord.Embed(title="**Himiko Toga**", colour=discord.Colour(int(random.choice(colours)))) embed.set_image(url=random.choice(toga_array)) embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar)) + embed.timestamp = datetime.datetime.utcnow() await ctx.send(embed=embed) else: