Documentation ¶
Index ¶
- func ErrAccessForbidden() *api.InteractionResponseData
- func ErrIsAccessDenied(err error) bool
- func ErrIsNotFound(err error) bool
- type AddFlagMappingParams
- type AddGuildOpts
- type AddTrackingParams
- type Backoff
- type Bot
- func (b *Bot) Close() error
- func (b *Bot) ConnQueries(ctx context.Context) (q *sqlc.Queries, closer func(), err error)
- func (b *Bot) Connect(ctx context.Context) error
- func (b *Bot) IsSuperAdmin(data cmdroute.CommandData) bool
- func (b *Bot) TxQueries(ctx context.Context) (q *sqlc.Queries, closer func(error) error, err error)
- type RemoveFlagMappingParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrAccessForbidden ¶
func ErrAccessForbidden() *api.InteractionResponseData
func ErrIsAccessDenied ¶
func ErrIsNotFound ¶
Types ¶
type AddFlagMappingParams ¶
type AddGuildOpts ¶
type AddGuildOpts struct {
Description string `discord:"description"` // required
}
type AddTrackingParams ¶
type AddTrackingParams struct {
Address string `discord:"address"`
}
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func New ¶
func New( ctx context.Context, token string, db *db.DB, superAdmins []discord.UserID, guildID discord.GuildID, channelID discord.ChannelID, pollingInterval time.Duration, legacyMessageFormat bool, ) (*Bot, error)
New requires a discord bot token and returns a Bot instance. A bot token starts with Nj... and can be obtained from the discord developer portal.
func (*Bot) ConnQueries ¶ added in v0.2.0
func (*Bot) IsSuperAdmin ¶
func (b *Bot) IsSuperAdmin(data cmdroute.CommandData) bool
type RemoveFlagMappingParams ¶
type RemoveFlagMappingParams struct {
Abbr string `discord:"abbr"`
}
Click to show internal directories.
Click to hide internal directories.