Documentation ¶
Index ¶
- Constants
- func BuildLink(text string, url string) string
- 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) SetFields(fields []*discordgo.MessageEmbedField) *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) SetTimestamp(timestamp 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
- type MessageEmbedFieldBuilder
- type Session
- type SessionConfig
Constants ¶
View Source
const ( EmbedColor = 0x00ff00 EmbedLimitTitle = 256 EmbedLimitDescription = 2048 EmbedLimitFieldValue = 1024 EmbedLimitFieldName = 256 EmbedLimitField = 25 EmbedSizeLimit = 4500 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Embed ¶
type Embed struct {
*discordgo.MessageEmbed
}
func (*Embed) InlineAllFields ¶
func (*Embed) SetDescription ¶
func (*Embed) SetThumbnail ¶
func (*Embed) SetTimestamp ¶
func (*Embed) TruncateDescription ¶
func (*Embed) TruncateFields ¶
func (*Embed) TruncateFooter ¶
func (*Embed) TruncateTitle ¶
type MessageEmbedFieldBuilder ¶ added in v1.1.0
type MessageEmbedFieldBuilder struct {
// contains filtered or unexported fields
}
func (*MessageEmbedFieldBuilder) Append ¶ added in v1.1.0
func (b *MessageEmbedFieldBuilder) Append(m string)
func (*MessageEmbedFieldBuilder) IsEmpty ¶ added in v1.1.0
func (b *MessageEmbedFieldBuilder) IsEmpty() bool
func (*MessageEmbedFieldBuilder) SetName ¶ added in v1.1.0
func (b *MessageEmbedFieldBuilder) SetName(name string)
func (*MessageEmbedFieldBuilder) ToMessageEmbedFields ¶ added in v1.1.0
func (b *MessageEmbedFieldBuilder) ToMessageEmbedFields() []*discordgo.MessageEmbedField
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg SessionConfig) (*Session, error)
func (*Session) SendMessage ¶
func (*Session) UpdateStatus ¶
type SessionConfig ¶
type SessionConfig struct { Token string CommandPrefix string Status string ServerRepository server.Repository GroupRepository group.Repository ObservationRepository observation.Repository API *sdk.SDK }
Click to show internal directories.
Click to hide internal directories.