Documentation ¶
Index ¶
- Variables
- func CalculateStatus(time time.Time) (bool, int)
- func CalculateValid(time time.Time) bool
- func RemoveValue(s []string, value string) []string
- func SplitTime(time time.Time) (int, int, int, int)
- func UpdatePinnedMessage(writeMsgData *types.WriteMessageData, utils types.Utils, ...)
- type Event
- func (e *Event) Activate(by *structs.User, at, telegramAt time.Time, points int)
- func (e *Event) AddEffect(effect *structs.Effect)
- func (e *Event) HasPartecipated(userID int64) bool
- func (e *Event) Partecipate(by *structs.User, at time.Time)
- func (e *Event) Reset()
- func (e *Event) StringifyEffects() string
- type EventActivation
- type EventPartecipation
- type EventsData
- func (ed *EventsData) AssignRandomEffects(utils types.Utils, effects ...structs.EffectPresence)
- func (ed *EventsData) EnabledRandomSets(percentage types.Interval, utils types.Utils) error
- func (ed *EventsData) Reset(newEffects bool, writeMsgData *types.WriteMessageData, utils types.Utils)
- func (ed *EventsData) SaveOnFile(utils types.Utils)
- func (ed *EventsData) WriteResetMessage(writeMsgData *types.WriteMessageData, utils types.Utils)
- type EventsKeys
- type EventsMap
- type EventsResetMessage
- type EventsStats
- type FuncMap
- type Set
- type SetJson
- type SetJsonSlice
- type SetSlice
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PinnedResetMessage EventsResetMessage HintRewardedUsers = make(map[string][]*structs.UserMinimal) Events *EventsData AssignEventsWithDefault = func(utils types.Utils) { Events = NewEventsData(true, utils) } )
View Source
var ( SetsFunctions = FuncMap{ "Equal": equal, "Short Equal": shortEqual, "Repeat": repeat, "Mirror": mirror, "Rise": rise, "Short Rise": shortRise, "Short Fall": shortFall, "Rapid Rise": rapidRise, "Short Rapid Rise": shortRapidRise, "Short Rapid Fall": shortRapidFall, "Double": double, "Short Triple": shortTriple, "Perfect Square": perfectSquare, } Sets = SetSlice{ {"Equal", "aa:aa", "static", false, equal}, {"Short Equal", "?a:aa", "static", false, shortEqual}, {"Repeat", "ab:ab", "static", false, repeat}, {"Mirror", "ab:ba", "static", false, mirror}, {"Rise", "ab:cd", "static", false, rise}, {"Short Rise", "?a:bc", "static", false, shortRise}, {"Short Fall", "?c:ba", "static", false, shortFall}, {"Rapid Rise", "ac:eg", "static", false, rapidRise}, {"Short Rapid Rise", "?a:ce", "static", false, shortRapidRise}, {"shortRapidFall", "?e:ca", "static", false, shortRapidFall}, {"double", "n:2*n", "static", false, double}, {"shortTriple", "?n:3*n", "static", false, shortTriple}, {"Perfect Square", "[unnamed]", "static", false, perfectSquare}, } SetsJson = SetJsonSlice{} AssignSetsFromSetsJson = func(utils types.Utils) { Sets = SetsJson.ToSlice() } AssignSetsWithDefault = func(utils types.Utils) { Sets = SetSlice{ {"Equal", "aa:aa", "static", false, equal}, {"Short Equal", "?a:aa", "static", false, shortEqual}, {"Repeat", "ab:ab", "static", false, repeat}, {"Mirror", "ab:ba", "static", false, mirror}, {"Rise", "ab:cd", "static", false, rise}, {"Short Rise", "?a:bc", "static", false, shortRise}, {"Short Fall", "?c:ba", "static", false, shortFall}, {"Rapid Rise", "ac:eg", "static", false, rapidRise}, {"Short Rapid Rise", "?a:ce", "static", false, shortRapidRise}, {"Short Rapid Fall", "?e:ca", "static", false, shortRapidFall}, {"Double", "n:2*n", "static", false, double}, {"Short Triple", "?n:3*n", "static", false, shortTriple}, {"Perfect Square", "[unnamed]", "static", false, perfectSquare}, } } )
Functions ¶
func CalculateValid ¶ added in v0.2.4
func RemoveValue ¶ added in v0.2.4
func UpdatePinnedMessage ¶ added in v0.2.5
Types ¶
type Event ¶ added in v0.2.4
type Event struct { Time time.Time Name string Points int Enabled bool Effects []*structs.Effect Activation *EventActivation Partecipations map[int64]*EventPartecipation }
func (*Event) HasPartecipated ¶ added in v0.2.4
func (*Event) Partecipate ¶ added in v0.2.4
func (*Event) StringifyEffects ¶ added in v0.2.5
type EventActivation ¶ added in v0.2.4
type EventPartecipation ¶ added in v0.2.4
type EventsData ¶ added in v0.2.4
type EventsData struct { Map EventsMap Keys EventsKeys Stats EventsStats }
func NewEventsData ¶ added in v0.2.4
func NewEventsData(newEffects bool, utils types.Utils) *EventsData
func (*EventsData) AssignRandomEffects ¶ added in v0.2.4
func (ed *EventsData) AssignRandomEffects(utils types.Utils, effects ...structs.EffectPresence)
func (*EventsData) EnabledRandomSets ¶ added in v0.2.4
func (*EventsData) Reset ¶ added in v0.2.4
func (ed *EventsData) Reset(newEffects bool, writeMsgData *types.WriteMessageData, utils types.Utils)
func (*EventsData) SaveOnFile ¶ added in v0.2.4
func (ed *EventsData) SaveOnFile(utils types.Utils)
func (*EventsData) WriteResetMessage ¶ added in v0.2.4
func (ed *EventsData) WriteResetMessage(writeMsgData *types.WriteMessageData, utils types.Utils)
type EventsKeys ¶ added in v0.2.0
type EventsKeys []string
type EventsResetMessage ¶ added in v0.2.5
type EventsStats ¶ added in v0.2.4
type SetJsonSlice ¶ added in v0.2.4
type SetJsonSlice []*SetJson
func (SetJsonSlice) ToSlice ¶ added in v0.2.4
func (sj SetJsonSlice) ToSlice() SetSlice
type SetSlice ¶ added in v0.2.4
type SetSlice []*Set
func (SetSlice) ToJsonSlice ¶ added in v0.2.4
func (s SetSlice) ToJsonSlice() SetJsonSlice
Click to show internal directories.
Click to hide internal directories.