models

package
v0.0.0-...-8101777 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	GuildID string
	UserID  string
	Message *discordgo.Message
}

type Happening

type Happening interface {
	Chance(ctx Context) float64 // 0.0-1.0
	Init(repo Repo, state *state.State)
	Do(ctx Context)
}

type Interaction

type Interaction struct {
	gorm.Model
	UserID  string
	Message string
}

func (*Interaction) TableName

func (*Interaction) TableName() string

type Repo

type Repo interface {
	StoreInteraction(interaction *Interaction) error
}

Jump to

Keyboard shortcuts

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