Create and send custom embed to a channel programatically

Md Shahriyar Alam

4 days ago

Construct Embed

pymyEmbed = Message(
  content="Message outside embed",
  title="This is title",
  url="https://ccbot.app", # A link thats clickable on title
  description="This is just a description",
  color=0xffffff, # Any hex code here followed by `0x`
  fields=[
    ("Field Title", "Field Value", true), # last one is inline value can be true or false
    ("Another Field", "This is awesome", true),
  ],
  image="https://i.ibb.co/XpK0FLG/slash-commands.png", # Any image here
  thumbnail="https://i.ibb.co/XpK0FLG/slash-commands.png", # Any image here
  footer="This is footer text",
  footer_icon="https://i.ibb.co/XpK0FLG/slash-commands.png", # Icon shows beside footer
  timestamp=interaction.created_at, # For current time
  author=user.username,
  author_icon=user.avatar_url,
  author_url="https://ccbot.app"
)

Send the embed

pysend_message(channel_id, myEmbed)

Both code must be in pre or post hook.

Need help?

If you still need any kind of help, have a suggestion for us or having a question in mind? Feel free to reach us out.

Join support server
logoCustom Commands

#1 Custom commands discord bot available on the internet

We Accept

stripe

Contact

20-22 Wenlock RoadEnglandN1 7GU

© WEiRDSOFT LTD. All rights reserved.