notify

package
v0.11.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTemp

func AddTemp(m tgbotapi.Message, tempTime time.Time, bot *tg.Bot)

Добавить сообщение в список временных

func CheckGroup

func CheckGroup(now time.Time, group database.Group, bot *tg.Bot)

func CheckNext

func CheckNext(db *xorm.Engine, now time.Time) ([]api.Notify, error)

Поиск следующей пары, дня, недели

func CheckShedules

func CheckShedules(bot *tg.Bot, now time.Time)

func ClearTemp

func ClearTemp(bot *tg.Bot, now time.Time)

Удаление временных сообщений

func FirstMailing

func FirstMailing(bot *tg.Bot, now time.Time)

Рассылка сообщений о начале занятий

func HandleErr

func HandleErr(err error)

Логирование некритических ошибок

func Mailing

func Mailing(bot *tg.Bot, notes []api.Notify)

Рассылка всех уведомлений

func ShortPairStr

func ShortPairStr(lesson database.Lesson) string

func StrNext

func StrNext(db *xorm.Engine, note api.Notify) (string, error)

Текст уведомления о следующей паре

func StrNextDay

func StrNextDay(bot *tg.Bot, note api.Notify) (string, error)

Текст уведомления о следующем дне

Types

type Next

type Next struct {
	Lesson []database.Lesson
	Day    []database.Lesson
	Week   []database.Lesson
}

Jump to

Keyboard shortcuts

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