chatstate

package
v0.0.0-...-5a6395a Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Lifetime = time.Hour // How long is the ChatState usable after Last.Unixtime.
View Source
const Locktime = time.Minute // How long can a handler exclusively use a ChatState.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Topic string
	Words []string
}

type ChatState

type ChatState struct {
	Last          *tb.Message // Last /play response.
	LastBeginTime time.Time   // Last Begin (Play or Undelivered) response time.
	Players       []*tb.User
	Card          Card
}

func (*ChatState) AddPlayer

func (cs *ChatState) AddPlayer(user *tb.User) bool

func (*ChatState) RemovePlayer

func (cs *ChatState) RemovePlayer(user *tb.User) bool

func (*ChatState) Reset

func (cs *ChatState) Reset()

Jump to

Keyboard shortcuts

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