mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
(cherry picked from commit 78e64ec559)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
This commit is contained in:
@@ -83,10 +83,13 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
embed = {}
|
embed = {}
|
||||||
colour = embed.get("color") if embed.get("color") else colour
|
colour = embed.get("color") if embed.get("color") else colour
|
||||||
contents.update(embed)
|
contents.update(embed)
|
||||||
if timestamp and isinstance(timestamp, datetime.datetime):
|
|
||||||
contents["timestamp"] = timestamp
|
|
||||||
embed = discord.Embed.from_dict(contents)
|
embed = discord.Embed.from_dict(contents)
|
||||||
embed.color = colour
|
embed.color = colour
|
||||||
|
if timestamp and isinstance(timestamp, datetime.datetime):
|
||||||
|
timestamp = timestamp.replace(tzinfo=datetime.timezone.utc)
|
||||||
|
embed.timestamp = timestamp
|
||||||
|
else:
|
||||||
|
embed.timestamp = datetime.datetime.now(tz=datetime.timezone.utc)
|
||||||
if footer:
|
if footer:
|
||||||
embed.set_footer(text=footer)
|
embed.set_footer(text=footer)
|
||||||
if thumbnail:
|
if thumbnail:
|
||||||
|
|||||||
Reference in New Issue
Block a user