Documentation ¶
Index ¶
- Constants
- func HandleError(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction
- func PanicsHandler(b *gotgbot.Bot, ctx *ext.Context, r interface{})
- func SendErrorPageToChat(ctx2 *ext.Context, bot *gotgbot.Bot, lang i18n.Language)
- func SendErrorToTelegram(err error, bot *gotgbot.Bot)
- func SendPageToChat(ctx2 *ext.Context, bot *gotgbot.Bot, page *pages.Page)
- func Setup(langs2 map[string]i18n.Language, chatRepo2 data.ChatRepository)
Constants ¶
View Source
const ErrorSendDelay = time.Second * 5
ErrorSendDelay is the delay between sending errors to Telegram
Variables ¶
This section is empty.
Functions ¶
func HandleError ¶
func HandleError(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction
func PanicsHandler ¶
PanicsHandler handles panics in the code and sends them to the user.
Implements the ext.DispatcherPanicHandler interface.
func SendErrorPageToChat ¶
func SendErrorToTelegram ¶
func SendErrorToTelegram(err error, bot *gotgbot.Bot)
func SendPageToChat ¶
SendPageToChat sends the given page to the chat of the given update. It either edits the message or sends a new one.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.