Documentation ¶
Index ¶
- Constants
- func DeferResponse(s *discordgo.Session, i *discordgo.Interaction) chan struct{}
- func ModifyInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction)
- func ModifyInteractionAndDelete(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, ...)
- func SendAndDeleteEmbedInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, ...)
- func SendEmbed(s *discordgo.Session, embed *discordgo.MessageEmbed, txtChannel string) *discordgo.Message
- func SendEmbedInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, ...)
- type Embed
- func (e *Embed) AddField(name, value string) *Embed
- func (e *Embed) InlineAllFields() *Embed
- func (e *Embed) SetAuthor(args ...string) *Embed
- func (e *Embed) SetColor(clr int) *Embed
- func (e *Embed) SetDescription(description string) *Embed
- func (e *Embed) SetFooter(args ...string) *Embed
- func (e *Embed) SetImage(args ...string) *Embed
- func (e *Embed) SetThumbnail(args ...string) *Embed
- func (e *Embed) SetTitle(name string) *Embed
- func (e *Embed) SetURL(url string) *Embed
- func (e *Embed) Truncate() *Embed
- func (e *Embed) TruncateDescription() *Embed
- func (e *Embed) TruncateFields() *Embed
- func (e *Embed) TruncateFooter() *Embed
- func (e *Embed) TruncateTitle() *Embed
Constants ¶
View Source
const ( EmbedLimitTitle = 256 EmbedLimitDescription = 2048 EmbedLimitFieldValue = 1024 EmbedLimitFieldName = 256 EmbedLimitField = 25 )
Constants for message embed character limits
Variables ¶
This section is empty.
Functions ¶
func DeferResponse ¶
func DeferResponse(s *discordgo.Session, i *discordgo.Interaction) chan struct{}
func ModifyInteraction ¶
func ModifyInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction)
Modify an already sent interaction
func ModifyInteractionAndDelete ¶
func ModifyInteractionAndDelete(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, wait time.Duration)
ModifyInteractionAndDelete modifies an already sent interaction and deletes it after the specified wait time
func SendAndDeleteEmbedInteraction ¶
func SendAndDeleteEmbedInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, wait time.Duration, isDeferred chan struct{})
SendAndDeleteEmbedInteraction sends and deletes after three second an embed in a given channel
func SendEmbed ¶
func SendEmbed(s *discordgo.Session, embed *discordgo.MessageEmbed, txtChannel string) *discordgo.Message
SendEmbed sends an embed in a given text channel
func SendEmbedInteraction ¶
func SendEmbedInteraction(s *discordgo.Session, embed *discordgo.MessageEmbed, i *discordgo.Interaction, c chan<- struct{}, isDeferred chan struct{})
SendEmbedInteraction sends an embed as response to an interaction
Types ¶
type Embed ¶
type Embed struct {
*discordgo.MessageEmbed
}
Embed ...
func (*Embed) InlineAllFields ¶
InlineAllFields sets all fields in the embed to be inline
func (*Embed) SetDescription ¶
SetDescription [desc]
func (*Embed) TruncateDescription ¶
TruncateDescription ...
func (*Embed) TruncateFields ¶
TruncateFields truncates fields that are too long
Click to show internal directories.
Click to hide internal directories.