disgomsg

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2025 License: GPL-3.0 Imports: 2 Imported by: 1 module, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID              primitive.ObjectID                `json:"_id,omitempty" bson:"_id,omitempty"`
	MessageID       string                            `json:"message_id,omitempty" bson:"message_id,omitempty"`
	ChannelID       string                            `json:"channel_id,omitempty" bson:"channel_id,omitempty"`
	AllowedMentions *discordgo.MessageAllowedMentions `json:"allowed_mentions,omitempty" bson:"allowed_mentions,omitempty"`
	Components      []discordgo.MessageComponent      `json:"components" bson:"components,omitempty"`
	Content         string                            `json:"content,omitempty" bson:"content,omitempty"`
	Embeds          []*discordgo.MessageEmbed         `json:"embeds" bson:"embeds,omitempty"`
	Files           []*discordgo.File                 `json:"-" bson:"-"`
	Flags           discordgo.MessageFlags            `json:"flags,omitempty" bson:"flags,omitempty"`
	Reference       *discordgo.MessageReference       `json:"message_reference,omitempty" bson:"message_reference,omitempty"`
	StickerIDs      []string                          `json:"sticker_ids" bson:"sticker_ids,omitempty"`
	TTS             bool                              `json:"tts" bson:"tts"`
}

Message is a Discord message representation used for sending and editing messages in a channel.

func (*Message) Delete

func (m *Message) Delete(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error

Delete deletes the message using the provided Discord session and clears the MessageID to indicate it has been deleted.

func (*Message) Edit

func (m *Message) Edit(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error

Edit edits the existing message using the provided Discord session and updates its content, components, embeds, and flags.

func (*Message) Send

func (m *Message) Send(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error

Send s the message to the specified channel using the provided Discord session.

func (*Message) SendEphemeral

func (m *Message) SendEphemeral(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error

SendEphemeral sends the message as an ephemeral message to the specified channel using the provided Discord session.

type Response

type Response struct {
	ID              primitive.ObjectID                          `json:"_id,omitempty" bson:"_id,omitempty"`
	Interaction     *discordgo.Interaction                      `json:"interaction" bson:"interaction"`
	Type            discordgo.InteractionResponseType           `json:"type,omitempty" bson:"type,omitempty"`
	AllowedMentions *discordgo.MessageAllowedMentions           `json:"allowed_mentions,omitempty" bson:"allowed_mentions,omitempty"`
	Attachments     []*discordgo.MessageAttachment              `json:"attachments,omitempty" bson:"attachments,omitempty"`
	Components      []discordgo.MessageComponent                `json:"components" bson:"components,omitempty"`
	Content         string                                      `json:"content" bson:"content,omitempty"`
	Embeds          []*discordgo.MessageEmbed                   `json:"embeds" bson:"embeds,omitempty"`
	Files           []*discordgo.File                           `json:"-" bson:"-"`
	TTS             bool                                        `json:"tts" bson:"tts"`
	Choices         []*discordgo.ApplicationCommandOptionChoice `json:"choices,omitempty" bson:"choices,omitempty"`     // Autocomplete interaction only.
	Flags           discordgo.MessageFlags                      `json:"flags,omitempty"`                                // Only MessageFlagsSuppressEmbeds and MessageFlagsEphemeral are valid.
	CustomID        string                                      `json:"custom_id,omitempty" bson:"custom_id,omitempty"` // Modal interaction only.
	Title           string                                      `json:"title,omitempty" bson:"title,omitempty"`         // Modal interaction only.
}

Response is a Discord interaction response representation used for sending and editing responses to interactions.

func (*Response) Delete

Delete deletes the interaction response using the provided Discord session.

func (*Response) Edit

Edit edits the existing interaction response using the provided Discord session and updates its content, components, embeds, and attachments.

func (*Response) Send

Send sends the interaction response to the specified channel using the provided Discord session.

func (*Response) SendEphemeral

func (r *Response) SendEphemeral(s *discordgo.Session, i *discordgo.Interaction, options ...discordgo.RequestOption) error

SendEphemeral sends the interaction response as an ephemeral message to the specified channel using the provided Discord session.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL