disgomsg

package module
v0.4.1 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 {
	AllowedMentions *discordgo.MessageAllowedMentions
	Components      []discordgo.MessageComponent
	Content         string
	Embeds          []*discordgo.MessageEmbed
	Files           []*discordgo.File
	Flags           discordgo.MessageFlags
	Reference       *discordgo.MessageReference
	StickerIDs      []string
	TTS             bool
	// contains filtered or unexported fields
}

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, 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, 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.

func (*Message) WithChannelID added in v0.4.0

func (m *Message) WithChannelID(channelID string) *Message

WithChannelID sets the channel ID that corresponds to the message to be edited or deleted.

func (*Message) WithMessageID added in v0.4.0

func (m *Message) WithMessageID(messageID string) *Message

WithMessageID sets the message ID that corresponds to the message to be edited or deleted.

type Response

type Response struct {
	Type            discordgo.InteractionResponseType
	AllowedMentions *discordgo.MessageAllowedMentions
	Attachments     []*discordgo.MessageAttachment
	Components      []discordgo.MessageComponent
	Content         string
	Embeds          []*discordgo.MessageEmbed
	Files           []*discordgo.File
	TTS             bool
	Choices         []*discordgo.ApplicationCommandOptionChoice // Autocomplete interaction only.
	Flags           discordgo.MessageFlags                      // Only MessageFlagsSuppressEmbeds and MessageFlagsEphemeral are valid.
	CustomID        string                                      // Modal interaction only.
	Title           string                                      // Modal interaction only.
	// contains filtered or unexported fields
}

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

func (*Response) Delete

func (r *Response) Delete(s *discordgo.Session, options ...discordgo.RequestOption) error

Delete deletes the interaction response using the provided Discord session.

func (*Response) Edit

func (r *Response) Edit(s *discordgo.Session, options ...discordgo.RequestOption) error

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.

func (*Response) WithInteraction added in v0.4.0

func (r *Response) WithInteraction(i *discordgo.Interaction) *Response

WithInteraction sets the interaction that corresponds to the response to be edited or deleted.

Jump to

Keyboard shortcuts

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