---
url: https://docs.juniper.bot/en/message-templates/types/discord/embed.md
description: Discord Embed data type used in JuniperBot Template Engine.
---

[Action]: ../../../cmd/custom/actions/index

[Number]: /en/message-templates/types/index#literals

[String]: /en/message-templates/types/index#literals

[Boolean]: /en/message-templates/types/index#literals

[List]: /en/message-templates/types/index#lists

[Map]: /en/message-templates/types/index#maps

[DateTime]: /en/message-templates/types/index#datetime

[TwitchChannel]: /en/message-templates/types/subscriptions/twitch#twitch-channel

[TwitchStream]: /en/message-templates/types/subscriptions/twitch#twitch-stream

[TwitchGame]: /en/message-templates/types/subscriptions/twitch#twitch-game

[YouTubeChannel]: /en/message-templates/types/subscriptions/youtube#youtube-channel

[YouTubeVideo]: /en/message-templates/types/subscriptions/youtube#youtube-video

[VkWallPost]: /en/message-templates/types/subscriptions/vk#vkwallpost

[Rank]: /en/message-templates/types/discord/rank

[Guild]: /en/message-templates/types/discord/guild

[Member]: /en/message-templates/types/discord/member

[Role]: /en/message-templates/types/discord/role

[Message]: /en/message-templates/types/discord/message

[Attachment]: /en/message-templates/types/discord/attachment

[Embed]: /en/message-templates/types/discord/embed

[Activity]: /en/message-templates/types/discord/activity

[MemberVoiceState]: /en/message-templates/types/discord/member-voice-state

[MemberPrimaryGuild]: /en/message-templates/types/discord/member-primary-guild

[MenuBuilder]: /en/message-templates/types/discord/menu-builder

[UserFlag]: /en/message-templates/types/discord/user-flag

[Permission]: /en/message-templates/types/discord/permission

[Category]: /en/message-templates/types/discord/category

[TextChannel]: /en/message-templates/types/discord/text-channel

[VoiceChannel]: /en/message-templates/types/discord/voice-channel

[NewsChannel]: /en/message-templates/types/discord/news-channel

[StageChannel]: /en/message-templates/types/discord/stage-channel

[ForumChannel]: /en/message-templates/types/discord/forum-channel

[MediaChannel]: /en/message-templates/types/discord/media-channel

[ThreadChannel]: /en/message-templates/types/discord/thread-channel

[Page]: /en/message-templates/types/storage/page

[GuildIndex]: /en/message-templates/types/storage/guild-index

[GuildIndexEntry]: /en/message-templates/types/storage/guild-index-entry

[GuildIndexes]: /en/message-templates/types/storage/guild-indexes

[MemberAttribute]: /en/message-templates/types/storage/member-attribute

[MemberAttributes]: /en/message-templates/types/storage/member-attributes

[Arguments]: /en/message-templates/types/custom-commands/arguments

[Parameters]: /en/message-templates/types/custom-commands/parameters

[Component]: /en/message-templates/types/custom-commands/component

[Modal]: /en/message-templates/types/custom-commands/modal

# Embed

This data type describes the Embed message builder. Almost all the methods return the same builder, so it is possible to build a method chains like this:

```template
{% do channel
    .createEmbed()
    .withContent('Content outside the embed')
    .withTitle('Title', 'https://juniper.bot')
    .withDescription('Oh, hi!')
    .appendDescription('\nHow are you?')
    .withDate(1587713425964)
    .withColor('ffff00')
    .withThumbnail(member.avatarUrl)
    .withImage('https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .withAuthor(member.nickname)
    .withFooter('Huff, bye!', member.avatarUrl)
    .addField('First field', 'Ah! A value of the first field', true)
    .addField('Second field', 'Something here too', true)
    .addReaction(':fox_face:')
    .addButton('LINK', 'https://juniper.bot/', 'Website', '🦊')
    .send()
%}
```

## Properties { #properties }

| Property      | Type      | Description                                    |
|:--------------|:----------|:-----------------------------------------------|
| `empty`       | \[Boolean] | `true` if empty                                |
| `validLength` | \[Boolean] | `true` if length is valid to send this message |
| `length`      | \[Number]  | Current embed length                           |

## Methods { #methods }

### `withContent(Content)` { #method-withcontent .template-method }

::: tabs

\== Description | mdi-text

Sets the message content outside the Embed.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description     |
|:----------|:---------|:----------------|
| `Content` | \[String] | Message content |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withContent('Content outside the embed')
    .withDescription('Oh, hi!')
    .send()
%}
```

:::

### `withTitle(Name, URL)` { #method-withtitle .template-method }

::: tabs

\== Description | mdi-text

Sets the Embed Title with URL.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description          |
|:----------|:---------|:---------------------|
| `Name`    | \[String] | Title content        |
| `URL`     | \[String] | Title URL (optional) |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withTitle('Title', 'https://juniper.bot')
    .send()
%}
```

:::

### `withAuthor(Name, URL, IconURL)` { #method-withauthor .template-method }

::: tabs

\== Description | mdi-text

Sets the Embed Author with optional link and icon.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description     |
|:----------|:---------|:----------------|
| `Name`    | \[String] | Author name     |
| `URL`     | \[String] | Author URL      |
| `IconURL` | \[String] | Author icon URL |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withAuthor(member.nickname, 'https://juniper.bot', 'https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .send()
%}
```

:::

### `withDescription(Content)` { #method-withdescription .template-method }

::: tabs

\== Description | mdi-text

Sets the Embed Description

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description               |
|:----------|:---------|:--------------------------|
| `Content` | \[String] | Embed description content |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .send()
%}
```

:::

### `appendDescription(String)` { #method-appenddescription .template-method }

::: tabs

\== Description | mdi-text

Appends new text to existing Embed Description

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description               |
|:----------|:---------|:--------------------------|
| `String`  | \[String] | Embed description content |

\== Example | mdi-code-block-braces

```template{3,4}
{% do channel
    .createEmbed()
    .appendDescription('Oh, hi!')
    .appendDescription('\nHow are you?')
    .send()
%}
```

:::

### `withThumbnail(URL, Description)` { #method-withthumbnail .template-method }

::: tabs

\== Description | mdi-text

Sets Embed Thumbnail

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter     | Type     | Description            |
|:--------------|:---------|:-----------------------|
| `URL`         | \[String] | Thumbnail image URL    |
| `Description` | \[String] | Description (optional) |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withThumbnail('https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .send()
%}
```

:::

### `withImage(URL, Description)` { #method-withimage .template-method }

::: tabs

\== Description | mdi-text

Sets Embed Image

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter     | Type     | Description            |
|:--------------|:---------|:-----------------------|
| `URL`         | \[String] | Image URL              |
| `Description` | \[String] | Description (optional) |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withImage('https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .send()
%}
```

:::

### `withColor(Color)` { #method-withcolor .template-method }

::: tabs

\== Description | mdi-text

Sets Embed border color, this method accepts HEX color string, for example `#FF0000` for red (you can remove the #).

<https://htmlcolorcodes.com/>

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description                                                                                                                                                  |
|:----------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Color`   | \[String] | Embed border color in HEX format.If invalid format specified, it will set default embed color.Empty string or `null` will set default blank color. |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withColor('ffff00')
    .withDescription('Oh, hi!')
    .send()
%}
```

:::

### `withDate(Date)` { #method-withdate .template-method }

::: tabs

\== Description | mdi-text

Adds a date to Embed Footer.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type                           | Description                                                                                                                        |
|:----------|:-------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------|
| `Date`    | \[DateTime], \[Number], \[String] | Can accept:Unix timestamp number;Formatted string: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`Date object |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .withDate(1587713425964)
    .send()
%}
```

:::

### `withFooter(Content, IconURL)` { #method-withfooter .template-method }

::: tabs

\== Description | mdi-text

Sets Embed Footer with optional icon.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description                |
|:----------|:---------|:---------------------------|
| `Content` | \[String] | Footer content             |
| `IconURL` | \[String] | Footer icon URL (optional) |

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .withFooter('Oh, hi!', 'https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .send()
%}
```

:::

### `addField(Name, Value, IsInline)` { #method-addfield .template-method }

::: tabs

\== Description | mdi-text

Adds new Embed Field with name, value and inline option specified.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter  | Type      | Description                              |
|:-----------|:----------|:-----------------------------------------|
| `Name`     | \[String]  | Name (title) of the field                |
| `Value`    | \[String]  | Value (description) of the field         |
| `IsInline` | \[Boolean] | If `true`, then the field will be inline |

\== Example | mdi-code-block-braces

```template{3,4}
{% do channel
    .createEmbed()
    .addField('First field', 'Ah! A value of the first field', true)
    .addField('Second field', 'Something here too', true)
    .send()
%}
```

:::

### `addBlankField(IsInline)` { #method-addblankfield .template-method }

::: tabs

\== Description | mdi-text

Adds en empty Embed Field with inline option.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter  | Type      | Description                              |
|:-----------|:----------|:-----------------------------------------|
| `IsInline` | \[Boolean] | If `true`, then the field will be inline |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .addField('First field', 'Ah! A value of the first field', true)
    .addBlankField(false)
    .addField('Second field', 'Something here too', true)
    .send()
%}
```

:::

### `addReaction(Emote)` { #method-addreaction .template-method }

::: tabs

\== Description | mdi-text

Adds a reaction to the resulting message of this embed. Works the same as [reaction](../../advanced/functions#reaction) function.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description                                                                                                                                                                                                                   |
|:----------|:---------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Emote`   | \[String] | Emotion in the following formats:`🦊` — Unicode-character;`:fox_face:` — name of emotion including default and server's emojis;`<a:foxwaggy:695917473874051112>` — custom emoji code. |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addReaction(':fox_face:')
    .send()
%}
```

:::

### `addButton(Style, URL_ID, Label, Emote, UUID, Disabled)` { #method-addbutton .template-method }

::: tabs

\== Description | mdi-text

Adds a button to the resulting message of this embed. Works the same as [button](../../advanced/functions#button) function.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter  | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:-----------|:----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Style`    | \[String]  | Button style:`LINK` — Link button style, usually in gray and has a link attached;`PRIMARY` — Primary button style, usually in blue. Often used as the accept, submit, or acknowledge button;`SECONDARY` — Secondary button style, usually in gray. Often used as the cancel or lesser used option;`SUCCESS` — Success/Approve button style, usually in green. This should be used to indicate a positive action;`DANGER` — Danger/Deny button style, usually in red. This button should be used to indicate destructive actions. |
| `URL_ID`   | \[String]  | URL for link button or identifier for other button types                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `Label`    | \[String]  | Button label                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Emote`    | \[String]  | Emotion in the following formats:`🦊` — Unicode-character;`:fox_face:` — name of emotion including default and server's emojis;`<a:foxwaggy:695917473874051112>` — custom emoji code.(Optional)                                                                                                                                                                                                                                                                                                                                                    |
| `UUID`     | \[String]  | UUID of [Action] to execute(Required for all buttons except link button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `Disabled` | \[Boolean] | If `true`, button will be disabled                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addButton('LINK', 'https://juniper.bot/', 'Website', '🦊')
    .send()
%}
```

:::

### `addSelectMenu(Type, ID, Label, UUID, Disabled)` { #method-addselectmenu .template-method }

::: tabs

\== Description | mdi-text

Adds a select menu to the resulting message of this embed. Works the same as [select_menu](../../advanced/functions#select_menu) function.

**Returns:** \[MenuBuilder]

\== Parameters | mdi-code-parentheses

| Parameter  | Type      | Description                                                                                                                                                                                                                                      |
|:-----------|:----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Type`     | \[String]  | Menu type: `STRING` — String Selection Menu;`USER` — User Selection Menu;`ROLE` — Role Selection Menu;`MENTIONABLE` — User\&Role Selection Menu;`CHANNEL` — Channel Selection Menu. |
| `ID`       | \[String]  | Menu identifier                                                                                                                                                                                                                                  |
| `Label`    | \[String]  | Placeholder text if nothing is specified                                                                                                                                                                                                         |
| `UUID`     | \[String]  | UUID of [Action] to execute                                                                                                                                                                                                                      |
| `Disabled` | \[Boolean] | If `true`, menu will be disabled(Optional)                                                                                                                                                                                                   |

\== Examples | mdi-code-block-braces

```template{4-8}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addSelectMenu('STRING', 'selectedSpecies', 'Who are you?', '27a55ca1-c13b-47f5-b8ad-e0da6329a53f')
      .addOption('Otter', 'otterOption', ':otter:')
      .addOption('Fox', 'foxOption', ':fox_face:')
      .withDefaultOption('foxOption')
    .endMenu()
    .send()
%}
```

```template{4-8}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addSelectMenu('CHANNEL', 'selectedChannels', 'Select channels', '27a55ca1-c13b-47f5-b8ad-e0da6329a53f')
      .withMinValues(2)
      .withMaxValues(3)
      .withChannelTypes(['VOICE', 'TEXT'])
    .endMenu()
    .send()
%}
```

:::

### `addComponentsRow()` { #method-addcomponentsrow .template-method }

::: tabs

\== Description | mdi-text

Adds new message components row.

**Returns:** \[Embed]

\== Example | mdi-code-block-braces

```template{5}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addButton('LINK', 'https://juniper.bot/', 'Website', '🦊')
    .addComponentsRow()
    .addButton('LINK', 'https://juniper.bot/', 'Website', '🦊')
    .send()
%}
```

:::

### `withPoll(Question, Duration, IsMultiAnswer)` { #method-withpoll .template-method }

::: tabs

\== Description | mdi-text

Adds a poll to the resulting message of this embed.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter       | Type      | Description                                                                                                                  |
|:----------------|:----------|:-----------------------------------------------------------------------------------------------------------------------------|
| `Question`      | \[String]  | The question of this poll                                                                                                    |
| `Duration`      | \[Number]  | Duration of this poll in milliseconds. Possible values are from 1 hour to 1 week.Optional, 1 day if not specified. |
| `IsMultiAnswer` | \[Boolean] | If `true`, then the poll will accept multiple answers.Optional, `false` if not specified.                          |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .withPoll('Foxes or otters?', 2 * 60 * 60 * 1000, true)
    .addPollAnswer('Foxes', ':fox_face:')
    .addPollAnswer('Otters', ':otter:')
    .send()
%}
```

:::

### `addPollAnswer(Answer, Emote)` { #method-addpollanswer .template-method }

::: tabs

\== Description | mdi-text

Adds an answer to the poll (up to 10). Must be executed after `withPoll`.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description                                                                                                                                                                                                                             |
|:----------|:---------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Answer`  | \[String] | The question of this poll                                                                                                                                                                                                               |
| `Emote`   | \[String] | Emotion in the following formats:`🦊` — Unicode-character;`:fox_face:` — name of emotion including default and server's emojis;`<a:foxwaggy:695917473874051112>` — custom emoji code.(Optional) |

\== Example | mdi-code-block-braces

```template{5,6}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .withPoll('Foxes or otters?', 2 * 60 * 60 * 1000, true)
    .addPollAnswer('Foxes', ':fox_face:')
    .addPollAnswer('Otters', ':otter:')
    .send()
%}
```

:::

### `clearFields()` { #method-clearfields .template-method }

::: tabs

\== Description | mdi-text

Clears all the Embed Fields added

**Returns:** \[Embed]

\== Example | mdi-code-block-braces

```template{6}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .addField('First field', 'Ah! A value of the first field', true)
    .addField('Second field', 'Something here too', true)
    .clearFields()
    .send()
%}
```

:::

### `clear()` { #method-clear .template-method }

::: tabs

\== Description | mdi-text

Clears the whole Embed data.

**Returns:** \[Embed]

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withImage('https://i.pinimg.com/originals/a4/41/6e/a4416e024d691af3a2971e4114a6da7f.png')
    .clear()
    .withDescription('You thought it will have picture? Nah, just this text')
    .send()
%}
```

:::

### `error()` { #method-error .template-method }

::: tabs

\== Description | mdi-text

Makes this Embed styled as error, sets its color to red with Error title.

**Returns:** \[Embed]

\== Example | mdi-code-block-braces

```template{3}
{% do channel
    .createEmbed()
    .error()
    .withDescription('Uh oh, some error')
    .send()
%}
```

:::

### `deleteAfterSec(Seconds)` { #method-deleteaftersec .template-method }

::: tabs

\== Description | mdi-text

Sets the seconds after which this Embed message will be deleted.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description                                                     |
|:----------|:---------|:----------------------------------------------------------------|
| `Seconds` | \[Number] | Time in seconds after which this Embed message will be deleted. |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('This message will be deleted after 10 seconds')
    .deleteAfterSec(10)
    .send()
%}
```

:::

### `preferEphemeral(Ephemeral)` { #method-preferephemeral .template-method }

::: tabs

\== Description | mdi-text

Sets if ephemeral (personal) message should be preferred.

Will only take effect if action is executed by the interaction (slash command, components, menu, modal, etc), is not deferred and only for `override`!

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter   | Type      | Description                                                  |
|:------------|:----------|:-------------------------------------------------------------|
| `Ephemeral` | \[Boolean] | If `true`, the message will be sent as ephemeral if possible |

\== Example | mdi-code-block-braces

```template
{% do override.preferEphemeral(true) %}
```

:::

### `editComponentMessage(Edit)` { #method-editcomponentmessage .template-method }

::: tabs

\== Description | mdi-text

Sets if original message content should be replaced by this one.

Will only take effect if action is executed by component or modal and only for `override`!

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type      | Description                                                          |
|:----------|:----------|:---------------------------------------------------------------------|
| `Edit`    | \[Boolean] | If `true`, the original message content will be replaced by this one |

\== Example | mdi-code-block-braces

```template
{% do override.editComponentMessage(true) %}
```

:::

### `withAllowedMentions(Types)` { #method-withallowedmentions .template-method }

::: tabs

\== Description | mdi-text

Sets allowed mention types.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type             | Description                                                                                                                                                                                                                                                                                                                                    |
|:----------|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Types`   | \[List]<\[String]> | List accepts following values:`USER` — Members will be notified when they get @pinged directly;`ROLE` — Members will be notified when they get pinged via @roles;`PUBLIC` — Members will be notified when they get pinged by @everyone or @here.If empty list specified, mentions will be disallowed. |

\== Example | mdi-code-block-braces

```template{5}
{% do channel
    .createEmbed()
    .withContent('О! ' ~ member.mention ~ ', привет!')
    .withDescription('It has a mention but no ping. Wow.')
    .withAllowedMentions([])
    .send()
%}
```

:::

### `pin(Pin)` { #method-pin .template-method }

::: tabs

\== Description | mdi-text

Pins this Embed.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type      | Description                         |
|:----------|:----------|:------------------------------------|
| `Pin`     | \[Boolean] | If `true`, the Embed will be pinned |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .pin(true)
    .send()
%}
```

:::

### `unpin(Unpin)` { #method-unpin .template-method }

::: tabs

\== Description | mdi-text

Unpins this Embed. Only works while updating the message.

**Returns:** \[Embed]

\== Parameters | mdi-code-parentheses

| Parameter | Type      | Description                           |
|:----------|:----------|:--------------------------------------|
| `Unpin`   | \[Boolean] | If `true`, the Embed will be unpinned |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi from edited message!')
    .unpin(true)
    .update(1479094559928750231)
%}
```

:::

### `send()` { #method-send .template-method }

::: tabs

\== Description | mdi-text

Sends message to the channel where this builder were created.

Returns `true` if message was sent successfully

**Returns:** \[Boolean]

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .send()
%}
```

:::

### `sendAndGet()` { #method-sendandget .template-method }

::: tabs

\== Description | mdi-text

Sends message to the channel where this builder were created.

Returns result message object if it was sent successfully

**Returns:** \[Message]

\== Example | mdi-code-block-braces

```template{4}
{% set newMessage = channel
    .createEmbed()
    .withDescription('Oh, hi!')
    .sendAndGet()
%}
{{ newMessage.id }}
```

:::

### `update(id)` { #method-update .template-method }

::: tabs

\== Description | mdi-text

Updates message by the Message ID given.

Returns `true`, if message was successfully updated.

**You can only edit bot's messages!**

**Returns:** \[Boolean]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description             |
|:----------|:---------|:------------------------|
| `id`      | \[Number] | Идентификатор сообщения |

\== Example | mdi-code-block-braces

```template{4}
{% do channel
    .createEmbed()
    .withDescription('Oh! Hi from edited message!')
    .update(1479095012389027990)
%}
```

:::

### `updateAndGet(id)` { #method-updateandget .template-method }

::: tabs

\== Description | mdi-text

Updates message by the Message ID given.

Returns result message object, if it was successfully updated.

**You can only edit bot's messages!**

**Returns:** \[Message]

\== Parameters | mdi-code-parentheses

| Parameter | Type     | Description             |
|:----------|:---------|:------------------------|
| `id`      | \[Number] | Идентификатор сообщения |

\== Example | mdi-code-block-braces

```template{4}
{% set updatedMessage = channel
    .createEmbed()
    .withDescription('Oh! Hi from edited message!')
    .updateAndGet(1479095012389027990)
%}
{{ updatedMessage.id }}
```

:::
