Documentation ¶
Index ¶
- func GetDutchText(item CategoryDay) (itemName string, itemDescription string, err error)
- func GetEnglishText(item CategoryDay) (itemName string, itemDescription string, err error)
- func GetItemText(item CategoryDay, language string) (itemName string, itemDescription string, err error)
- func GetSiteContent(campus string) []interface{}
- type ById
- type CategoryDay
- type MenuCommand
- type ResponseTexts
- type WeekMenu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDutchText ¶
func GetDutchText(item CategoryDay) (itemName string, itemDescription string, err error)
func GetEnglishText ¶
func GetEnglishText(item CategoryDay) (itemName string, itemDescription string, err error)
func GetItemText ¶
func GetItemText(item CategoryDay, language string) (itemName string, itemDescription string, err error)
GetItemText returns the item strings with the correct language attempts to retrieve the requested info TODO: is it possible to pass a list of languages and their responses to generalize this function?
func GetSiteContent ¶
func GetSiteContent(campus string) []interface{}
GetSiteContent returns the json from the api
Types ¶
type ById ¶
type ById []CategoryDay
type CategoryDay ¶
type MenuCommand ¶
type MenuCommand struct{}
func NewMenuCommand ¶
func NewMenuCommand() *MenuCommand
func (*MenuCommand) Info ¶
func (h *MenuCommand) Info() []command.Command
Info return the commands in this package
func (*MenuCommand) InstallSlashCommands ¶
func (h *MenuCommand) InstallSlashCommands(session *discordgo.Session) error
InstallSlashCommands registers the slash commands
func (*MenuCommand) Register ¶
func (h *MenuCommand) Register(registry command.Registry, server command.Server)
Register registers the handlers
func (*MenuCommand) SayMenu ¶
func (h *MenuCommand) SayMenu(s *discordgo.Session, i *discordgo.InteractionCreate)
SayMenu relays the menu
type ResponseTexts ¶
type ResponseTexts struct { Language string LanguageCode string TryLater string NoWeekMenu string NoWeekMenuSunday string NoDayMenu string PoliteResponse string NoItem func(itemName string) string }
func GetResponseTexts ¶
func GetResponseTexts(language string) (responses ResponseTexts)
GetResponseTexts returns the different localisation options
type WeekMenu ¶
type WeekMenu struct { Days [5]struct { MenuItems []CategoryDay Date time.Time } }
only works for Geel... not anymore!
Click to show internal directories.
Click to hide internal directories.