scribe

package
v0.0.0-...-6bcae3e Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageReader

type MessageReader interface {
	ChannelMessages(channelID string, limit int, beforeID, afterID, aroundID string) (st []*discordgo.Message, err error)
}

Intentionally shaped to fit discordgo.Session, but left flexible in case someone wants to fake/stub it.

type Scribe

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

func NewScribe

func NewScribe(db *sql.DB, ctx context.Context, reader MessageReader) *Scribe

func (*Scribe) OnNewMessage

func (s *Scribe) OnNewMessage(channelID string)

type SlurpMessagesResult

type SlurpMessagesResult struct {
	Complete         bool // true if all messages are in the database
	MessagesRead     int  // number of messages read from Discord
	BeginningReached bool // true if the beginning of the channel has been reached during this read
	ReadingEarlier   bool // true if was reading earlier messages
}

Jump to

Keyboard shortcuts

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