l33t

package
v0.0.0-...-993cae5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BonusConfig

type BonusConfig struct {
	SubString    string // string to search for in timestamp
	Greeting     string // Message from bot to user upon bonus hit
	StepPoints   int    // points to multiply substring position with
	NoStepPoints int    // points to return for match when UseStep == false
	PrefixChar   rune   // the char required as only prefix for max bonus, e.g. '0'
	UseStep      bool   // if to multiply points for each position to the right in string
}

type BonusConfigs

type BonusConfigs []BonusConfig

type BonusReturn

type BonusReturn struct {
	Match  string
	Msg    string
	Points int
}

type BonusReturns

type BonusReturns []BonusReturn

type Bot

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

type Channel

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

type ChannelData

type ChannelData struct {
	Users         UserDataMap
	InspectionTax float64 `json:"inspection_tax"`
	OvershootTax  int     `json:"overshoot_tax"`
	InspectAlways bool    `json:"inspect_always"`
	TaxLoners     bool    `json:"tax_loners"`
	PostTaxFail   bool    `json:"post_tax_fail"`
}

type ChannelDataMap

type ChannelDataMap map[string]*ChannelData

type EntryTime

type EntryTime struct {
	Last time.Time `json:"last_entry"`
	Best time.Time `json:"best_entry"`
}

type InspectionDecision

type InspectionDecision struct {
	Inspect bool
	Weekday time.Weekday
	Random  time.Weekday
}

type TimeCode

type TimeCode uint8

func (TimeCode) String

func (tc TimeCode) String() string

type TimeFrame

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

type User

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

User is a transient wrapper for UserData

type UserData

type UserData struct {
	Entry   EntryTime    `json:"entry"`
	Taxes   ValueTracker `json:"taxes"`   // how much tax over time
	Bonuses ValueTracker `json:"bonuses"` // how much bonuses over time
	Misses  ValueTracker `json:"misses"`  // how many times have the user been early or late
	Points  int          `json:"score"`   // current points total
	Done    bool         `json:"done"`    // true if the user has reached the target limit
}

type UserDataMap

type UserDataMap map[string]*UserData

type ValueTracker

type ValueTracker struct {
	Times int `json:"times"`
	Total int `json:"total"`
}

Jump to

Keyboard shortcuts

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