Remove timestamp from a discord embed

Viewed 641

I am trying to modify an embed from an existing message, How do I delete or remove the timestamp from the message

@commands.command()
async def remove_timestamp(self, ctx, msg: discord.MessageConverter):
   embed = msg.embeds[0]
   embed.timestamp = None #error raised here
   await msg.edit(embed=embed)

Similar code worked when I tried to update color of the embeds or change the timestamp, but removing the timestamp raises an error

1 Answers

Setting properties of embeds to None or removing it can be done with discord.Embed.Empty

embed.timestamp = discord.Embed.Empty

This is the default value used by discord.py if you don't specify it manually.

References:

  1. Empty
  2. Embeds
Related