hdkv
/
i2_bot
Archived
1
Fork 0
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
i2_bot/lib/talkers/errors.go

31 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// i2_bot Instinct PokememBro Bot
// Copyright (c) 2017 Vladimir "fat0troll" Hodakov
package talkers
import (
"github.com/go-telegram-bot-api/telegram-bot-api"
)
// AnyMessageUnauthorized throws when user can't do something
func (t *Talkers) AnyMessageUnauthorized(update *tgbotapi.Update) {
message := "Извини, действие для тебя недоступно. Возможно, у меня нет твоего профиля или же твои права недостаточны для совершения данного действия\n\n"
message += "Если тебе кажется, что это ошибка, пиши @fat0troll.\n"
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = "Markdown"
c.Bot.Send(msg)
}
// BotError throws when bot can't do something
func (t *Talkers) BotError(update *tgbotapi.Update) {
message := "Ой, внутренняя ошибка в боте :(\n\n"
message += "Напиши @fat0troll, приложив форвардом последние сообщения до этого.\n"
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = "Markdown"
c.Bot.Send(msg)
}