Documentation ¶
Index ¶
- Constants
- func AddImageToGif(gifImages *gif.GIF, img *image.Image, delay int)
- func IsSnowflake(input string) bool
- func NameToGif(name string, avatarURL string) (*bytes.Buffer, error)
- func NewReactionator(channelID string, discord *discordgo.Session, ...) *reactionator
- func StringInSlice(a string, list []string) bool
- type Author
- type Context
- func (context *Context) DM(content string) error
- func (context *Context) Delete() error
- func (context *Context) GetVoiceChannel() (*discordgo.VoiceState, error)
- func (context *Context) IsDM() bool
- func (context *Context) JoinUserVoiceChannel() (*discordgo.VoiceConnection, error)
- func (context *Context) Reply(content string) (*discordgo.Message, error)
- func (context *Context) ReplyComplex(message *discordgo.MessageSend) (*discordgo.Message, error)
- func (context *Context) ReplyComplexNoMention(message *discordgo.MessageSend) (*discordgo.Message, error)
- func (context *Context) ReplyEmbed(embed *discordgo.MessageEmbed) (*discordgo.Message, error)
- func (context *Context) ReplyEmbedNoMention(embed *discordgo.MessageEmbed) (*discordgo.Message, error)
- func (context *Context) ReplyNoMention(content string) (*discordgo.Message, error)
- type Controller
- func (controller *Controller) AddToQueue(context *Context) error
- func (controller *Controller) NewControllerMessage(reactionListener *ReactionListener) error
- func (controller *Controller) PauseResume()
- func (controller *Controller) Play() error
- func (controller *Controller) Skip()
- func (controller *Controller) Stop()
- 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
- type Metadata
- type ReactionListener
- type ReactionatorType
- type Song
- type VideoInfo
Constants ¶
View Source
const ( EmbedLimitTitle = 256 EmbedLimitDescription = 2048 EmbedLimitFieldValue = 1024 EmbedLimitFieldName = 256 EmbedLimitField = 25 EmbedLimit = 4000 )
Constants for message embed character limits
View Source
const FONTPATH = "./assets/fonts/unifont.ttf"
Variables ¶
This section is empty.
Functions ¶
func IsSnowflake ¶
func NewReactionator ¶
func NewReactionator(channelID string, discord *discordgo.Session, reactionListener *ReactionListener, listenToRemove bool, removeReaction bool, messageType ReactionatorType, user *discordgo.User) *reactionator
func StringInSlice ¶
Types ¶
type Context ¶
type Context struct { Discord *discordgo.Session TextChannel *discordgo.Channel Message *discordgo.MessageCreate Args []string }
func NewContext ¶
func (*Context) GetVoiceChannel ¶
func (context *Context) GetVoiceChannel() (*discordgo.VoiceState, error)
func (*Context) JoinUserVoiceChannel ¶
func (context *Context) JoinUserVoiceChannel() (*discordgo.VoiceConnection, error)
func (*Context) ReplyComplex ¶
func (*Context) ReplyComplexNoMention ¶
func (*Context) ReplyEmbed ¶
func (*Context) ReplyEmbedNoMention ¶
type Controller ¶
func NewController ¶
func NewController(discord *discordgo.Session, channel *discordgo.Channel, previousStatus *discordgo.UpdateStatusData, reactionListener *ReactionListener) (*Controller, error)
func (*Controller) AddToQueue ¶
func (controller *Controller) AddToQueue(context *Context) error
func (*Controller) NewControllerMessage ¶
func (controller *Controller) NewControllerMessage(reactionListener *ReactionListener) error
func (*Controller) PauseResume ¶
func (controller *Controller) PauseResume()
func (*Controller) Play ¶
func (controller *Controller) Play() error
func (*Controller) Skip ¶
func (controller *Controller) Skip()
func (*Controller) Stop ¶
func (controller *Controller) Stop()
type Embed ¶
type Embed struct {
*discordgo.MessageEmbed
}
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
type ReactionListener ¶
type ReactionListener struct { Messages map[string]*reactionator Users map[string]*activeReactionators // contains filtered or unexported fields }
func NewReactionListener ¶
func NewReactionListener(discord *discordgo.Session) ReactionListener
func (*ReactionListener) React ¶
func (reactionListener *ReactionListener) React(message *discordgo.MessageReaction) error
type ReactionatorType ¶
type ReactionatorType int8
const ( ReactionatorTypeHelp ReactionatorType = iota ReactionatorTypeController )
Click to show internal directories.
Click to hide internal directories.