Documentation
¶
Index ¶
- type Message
- func (m *Message) Delete(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error
- func (m *Message) Edit(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error
- func (m *Message) Send(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error
- func (m *Message) SendEphemeral(s *discordgo.Session, channelID string, options ...discordgo.RequestOption) error
- type Response
- func (r *Response) Delete(s *discordgo.Session, i *discordgo.Interaction, ...) error
- func (r *Response) Edit(s *discordgo.Session, i *discordgo.Interaction, ...) error
- func (r *Response) Send(s *discordgo.Session, i *discordgo.Interaction, ...) error
- func (r *Response) SendEphemeral(s *discordgo.Session, i *discordgo.Interaction, ...) error
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 ¶
func (r *Response) Delete(s *discordgo.Session, i *discordgo.Interaction, options ...discordgo.RequestOption) error
Delete deletes the interaction response using the provided Discord session.
func (*Response) Edit ¶
func (r *Response) Edit(s *discordgo.Session, i *discordgo.Interaction, 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 ¶
func (r *Response) Send(s *discordgo.Session, i *discordgo.Interaction, options ...discordgo.RequestOption) error
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.