Added "banned" status for players
This commit is contained in:
@@ -20,6 +20,18 @@ func (t *Talkers) AnyMessageUnauthorized(update *tgbotapi.Update) string {
|
||||
return "fail"
|
||||
}
|
||||
|
||||
// BanError throws error for persona non grata
|
||||
func (t *Talkers) BanError(update *tgbotapi.Update) string {
|
||||
message := "Вам здесь не рады. Использование бота для вас запрещено."
|
||||
|
||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
|
||||
msg.ParseMode = "Markdown"
|
||||
|
||||
c.Bot.Send(msg)
|
||||
|
||||
return "fail"
|
||||
}
|
||||
|
||||
// BotError throws when bot can't do something
|
||||
func (t *Talkers) BotError(update *tgbotapi.Update) string {
|
||||
message := "Ой, внутренняя ошибка в боте :(\n\n"
|
||||
|
@@ -4,8 +4,8 @@
|
||||
package talkersinterface
|
||||
|
||||
import (
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"git.wtfteam.pro/fat0troll/i2_bot/lib/dbmapping"
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
)
|
||||
|
||||
// TalkersInterface implements Talkers for importing via appcontex
|
||||
@@ -18,6 +18,7 @@ type TalkersInterface interface {
|
||||
FiveOffer(update *tgbotapi.Update) string
|
||||
|
||||
AnyMessageUnauthorized(update *tgbotapi.Update) string
|
||||
BanError(update *tgbotapi.Update) string
|
||||
BotError(update *tgbotapi.Update) string
|
||||
|
||||
LongMessage(update *tgbotapi.Update) string
|
||||
|
Reference in New Issue
Block a user