beater

package
v0.0.0-...-59f9656 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DBFile = "checkpoints.db"
View Source
const GuildsToRequest = 100
View Source
const MessagesToRequest = 100

Variables

This section is empty.

Functions

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

New creates an instance of discobeat.

Types

type Beater

type Beater interface {
	// contains filtered or unexported methods
}

type Discobeat

type Discobeat struct {
	// contains filtered or unexported fields
}

Discobeat configuration.

func (*Discobeat) Run

func (bt *Discobeat) Run(b *beat.Beat) error

Run starts discobeat.

func (*Discobeat) Stop

func (bt *Discobeat) Stop()

Stop stops discobeat.

type DiscordSession

type DiscordSession interface {
	GuildChannels(guildID string) (st []*discordgo.Channel, err error)
	UserGuilds(limit int, beforeID, afterID string) (st []*discordgo.UserGuild, err error)
	ChannelMessages(channelID string, limit int, beforeID, afterID, aroundID string) (st []*discordgo.Message, err error)
}

type DiscordUser

type DiscordUser struct {
	// contains filtered or unexported fields
}

type RealUserCreator

type RealUserCreator struct{}

func (*RealUserCreator) NewFromToken

func (rc *RealUserCreator) NewFromToken(token string) (s *discordgo.Session, err error)

func (*RealUserCreator) NewFromUsernamePassword

func (rc *RealUserCreator) NewFromUsernamePassword(username, password string) (s *discordgo.Session, err error)

type UserCreator

type UserCreator interface {
	NewFromToken(token string) (s *discordgo.Session, err error)
	NewFromUsernamePassword(username, password string) (s *discordgo.Session, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL