NewWebhookMessageCreate (discord/webhook_message_create.go)

disgo · discord/webhook_message_create.go · go · Apache-2.0
voice, Voice / Speech

Module exposing: NewWebhookMessageCreate, NewWebhookMessageCreateV2, UnmarshalJSON, ToBody, WithContent, WithContentf, WithUsername, WithAvatarURL

// Source: https://github.com/disgoorg/disgo | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package discord

import (
	"fmt"
	"io"
	"slices"

	"github.com/disgoorg/json/v2"
	"github.com/disgoorg/snowflake/v2"
)

// NewWebhookMessageCreate returns a new WebhookMessageCreate with no fields set.
func NewWebhookMessageCreate() WebhookMessageCreate {
	return WebhookMessageCreate{}
}

// NewWebhookMessageCreateV2 returns a new WebhookMessageCreate with MessageFlagIsComponentsV2 flag set & allows to directly pass components.
func NewWebhookMessageCreateV2(components ...LayoutComponent) WebhookMessageCreate {
	return WebhookMessageCreate{
		Flags:      MessageFlagIsComponentsV2,
		Compon

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key