Documentation
¶
Index ¶
- Variables
- type DirectMessage
- func (dm *DirectMessage) Delete(s *discordgo.Session, options ...discordgo.RequestOption) error
- func (dm *DirectMessage) Edit(s *discordgo.Session, options ...discordgo.RequestOption) error
- func (dm *DirectMessage) Send(s *discordgo.Session, memberID string, options ...discordgo.RequestOption) error
- type Message
- type Option
- func WithAllowedMentions(allowedMentions *discordgo.MessageAllowedMentions) Option
- func WithAttachments(attachments []*discordgo.MessageAttachment) Option
- func WithChannelID(channelID string) Option
- func WithChoices(choices []*discordgo.ApplicationCommandOptionChoice) Option
- func WithComponents(components []discordgo.MessageComponent) Option
- func WithContent(content string) Option
- func WithCustomID(customID string) Option
- func WithEmbeds(embeds []*discordgo.MessageEmbed) Option
- func WithFiles(files []*discordgo.File) Option
- func WithFlags(flags discordgo.MessageFlags) Option
- func WithInteraction(interaction *discordgo.Interaction) Option
- func WithMessageID(messageID string) Option
- func WithReference(reference *discordgo.MessageReference) Option
- func WithResponseType(responseType *discordgo.InteractionResponseType) Option
- func WithStickerIDs(stickerIDs []string) Option
- func WithTTS(tts bool) Option
- func WithTitle(title string) Option
- type Response
- func (r *Response) Delete(s *discordgo.Session, options ...discordgo.RequestOption) error
- func (r *Response) Edit(s *discordgo.Session, options ...discordgo.RequestOption) 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 ¶
Functions ¶
This section is empty.
Types ¶
type DirectMessage ¶ added in v0.5.0
type DirectMessage message
DirectMessage is a Discord message representation used for sending a message to a user in a private channel.
func NewDirectMessage ¶ added in v0.6.0
func NewDirectMessage(opts ...Option) *DirectMessage
NewDirectMessage creates a new message instance with the provided options that may be sent as a direct message to a given member.
func (*DirectMessage) Delete ¶ added in v0.5.0
func (dm *DirectMessage) 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 (*DirectMessage) Edit ¶ added in v0.5.0
func (dm *DirectMessage) 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 (*DirectMessage) Send ¶ added in v0.5.0
func (dm *DirectMessage) Send(s *discordgo.Session, memberID string, options ...discordgo.RequestOption) error
Send sends a direct message to the specified member using the provided Discord session.
type Message ¶
type Message message
Message is a Discord message representation used for sending and editing messages in a channel.
func NewMessage ¶ added in v0.6.0
NewMessage creates a new message instance with the provided options that may be sent to a channel.
func (*Message) Delete ¶
Delete deletes the message using the provided Discord session and clears the MessageID to indicate it has been deleted.
type Option ¶ added in v0.6.0
type Option func(*message)
Option is a function that modifies a message.
func WithAllowedMentions ¶ added in v0.6.0
func WithAllowedMentions(allowedMentions *discordgo.MessageAllowedMentions) Option
WithAllowedMentions sets the allowed mentions for the message.
func WithAttachments ¶ added in v0.6.0
func WithAttachments(attachments []*discordgo.MessageAttachment) Option
WithAttachments sets the attachments for the message.
func WithChannelID ¶ added in v0.6.0
WithChannelID sets the channel ID for the message.
func WithChoices ¶ added in v0.6.0
func WithChoices(choices []*discordgo.ApplicationCommandOptionChoice) Option
WithChoices sets the choices for the message.
func WithComponents ¶ added in v0.6.0
func WithComponents(components []discordgo.MessageComponent) Option
WithComponents sets the components for the message.
func WithContent ¶ added in v0.6.0
WithContent sets the content for the message.
func WithCustomID ¶ added in v0.6.0
WithCustomID sets the custom ID for the message.
func WithEmbeds ¶ added in v0.6.0
func WithEmbeds(embeds []*discordgo.MessageEmbed) Option
WithEmbeds sets the embeds for the message.
func WithFlags ¶ added in v0.6.0
func WithFlags(flags discordgo.MessageFlags) Option
WithFlags sets the flags for the message.
func WithInteraction ¶ added in v0.6.0
func WithInteraction(interaction *discordgo.Interaction) Option
WithInteraction sets the interaction for the message.
func WithMessageID ¶ added in v0.6.0
WithMessageID sets the message ID for the message.
func WithReference ¶ added in v0.6.0
func WithReference(reference *discordgo.MessageReference) Option
WithReference sets the reference for the message.
func WithResponseType ¶ added in v0.6.0
func WithResponseType(responseType *discordgo.InteractionResponseType) Option
WithResponseType sets the response type for the message.
func WithStickerIDs ¶ added in v0.6.0
WithStickerIDs sets the sticker IDs for the message.
type Response ¶
type Response message
Response is a Discord interaction response representation used for sending and editing responses to interactions.
func NewResponse ¶ added in v0.6.0
NewResponse creates a new message instance with the provided options that may be sent as a response to an interaction.
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 ¶
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.