glyph/builders/message
This contains the builder functions for constructing a MessagePayload
Examples
message.new()
|> message.content("Example message")
let example_embed =
embed.new()
|> embed.title("Example embed")
|> embed.description("Example description")
message.new()
|> message.embed(example_embed)
Functions
pub fn content(
m: MessagePayload,
content: String,
) -> MessagePayload
Set the content of the message
pub fn is_tts(m: MessagePayload) -> MessagePayload
Sets the tts
flag to True
for Text-to-Speech messages
pub fn mentions_everyone(m: MessagePayload) -> MessagePayload
If your message contains @everyone, this must be set
pub fn mentions_roles(m: MessagePayload) -> MessagePayload
If your message contains a mention of a role, this must be set
pub fn mentions_users(m: MessagePayload) -> MessagePayload
If your message contains a mention of a user, this must be set
pub fn reply_to(
m: MessagePayload,
msg: Message,
) -> MessagePayload
Sets the message to be a reply to a given Message
pub fn stickers(
m: MessagePayload,
sticker_ids: List(String),
) -> MessagePayload
Send a sticker with your message (maximum of 3)
Note: since you cannot extract sticker IDs from the Discord application right now, you will need to wait for Glyph to implement the proper API interactions.
pub fn suppress_notifications(
m: MessagePayload,
) -> MessagePayload
Sets a flag to suppress notifications for this message