config

package
v0.0.0-...-d7ff19b Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoomConfig

func AddRoomConfig(id string)

func RoomConfigInitialUpdate

func RoomConfigInitialUpdate(ids []id.RoomID)

RoomConfigInitialUpdate updates all RoomConfig entries to set activity and create blank configs

func SetRoomConfigActive

func SetRoomConfigActive(id string, active bool)

SetRoomConfigActive updates the active state for a given room

Types

type RoomConfig

type RoomConfig struct {
	// SubscribedLeagues are leagues for which new matches should be auto-posted
	SubscribedLeagues []string `yaml:"leagues"`

	// Active tells if the bot is active in this room (Set to false on leave/kick/ban)
	Active bool `yaml:"active"`

	// Language for the bot messages in this room, this has to exist
	Language string `yaml:"lang"`
}

RoomConfig is the configuration attached to every joined room

func GetRoomConfig

func GetRoomConfig(id string) RoomConfig

GetRoomConfig returns the RoomConfig linked to the specified ID

type RoomConfigTree

type RoomConfigTree map[string]RoomConfig

RoomConfigTree is a map from string to RoomConfig

Jump to

Keyboard shortcuts

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