kitazith/webhook/execute
Types
pub type ExecutePayload {
ExecutePayload(
content: option.Option(String),
username: option.Option(String),
avatar_url: option.Option(String),
tts: option.Option(Bool),
embeds: option.Option(List(embed.Embed)),
allowed_mentions: option.Option(
allowed_mentions.AllowedMentions,
),
components: option.Option(List(component.Component)),
attachments: option.Option(List(attachment.Attachment)),
flags: option.Option(List(ExecutePayloadFlag)),
thread_name: option.Option(String),
applied_tags: option.Option(List(snowflake.Snowflake)),
poll: option.Option(poll.Poll),
)
}
Constructors
-
ExecutePayload( content: option.Option(String), username: option.Option(String), avatar_url: option.Option(String), tts: option.Option(Bool), embeds: option.Option(List(embed.Embed)), allowed_mentions: option.Option( allowed_mentions.AllowedMentions, ), components: option.Option(List(component.Component)), attachments: option.Option(List(attachment.Attachment)), flags: option.Option(List(ExecutePayloadFlag)), thread_name: option.Option(String), applied_tags: option.Option(List(snowflake.Snowflake)), poll: option.Option(poll.Poll), )Arguments
- content
-
Up to 2000 characters.
- username
-
At least 1 character and up to 80 characters.
- embeds
-
Up to 10 embeds.
Up to 6000 characters total across all
title,description,field.name,field.value,footer.text, andauthor.namefields in all embeds per message.Source: Message Resource - Documentation - Discord > Embed Object > Embed Limits
- thread_name
-
If specified, at least 1 character and up to 100 characters.
- applied_tags
-
Snowflake IDs of tags applied to the message
Learn more:
pub type ExecutePayloadFlag {
SuppressEmbeds
SuppressNotifications
IsComponentsV2
}
Constructors
-
SuppressEmbedsInclude no embeds
-
SuppressNotificationsDo not trigger a notification
-
IsComponentsV2
Values
pub fn new() -> ExecutePayload
pub fn to_json(payload: ExecutePayload) -> json.Json
pub fn to_string(payload: ExecutePayload) -> String
pub fn to_string_tree(
payload: ExecutePayload,
) -> string_tree.StringTree
pub fn validate(
payload: ExecutePayload,
) -> Result(ExecutePayload, List(validation.ValidationError))
pub fn validate_with_query(
payload: ExecutePayload,
query: execute_query.ExecuteQuery,
) -> Result(ExecutePayload, List(validation.ValidationError))
pub fn with_allowed_mentions(
payload: ExecutePayload,
mentions: allowed_mentions.AllowedMentions,
) -> ExecutePayload
pub fn with_applied_tags(
payload: ExecutePayload,
applied_tags: List(snowflake.Snowflake),
) -> ExecutePayload
pub fn with_attachments(
payload: ExecutePayload,
attachments: List(attachment.Attachment),
) -> ExecutePayload
pub fn with_avatar_url(
payload: ExecutePayload,
avatar_url: String,
) -> ExecutePayload
pub fn with_components(
payload: ExecutePayload,
components: List(component.Component),
) -> ExecutePayload
pub fn with_content(
payload: ExecutePayload,
content: String,
) -> ExecutePayload
pub fn with_embeds(
payload: ExecutePayload,
embeds: List(embed.Embed),
) -> ExecutePayload
pub fn with_flags(
payload: ExecutePayload,
flags: List(ExecutePayloadFlag),
) -> ExecutePayload
pub fn with_poll(
payload: ExecutePayload,
poll: poll.Poll,
) -> ExecutePayload
pub fn with_thread_name(
payload: ExecutePayload,
thread_name: String,
) -> ExecutePayload
pub fn with_tts(
payload: ExecutePayload,
tts: Bool,
) -> ExecutePayload
pub fn with_username(
payload: ExecutePayload,
username: String,
) -> ExecutePayload