Archived
1

Some work on ordering. Special user behaviour

See #10
This commit is contained in:
2017-11-26 15:28:55 +04:00
parent 8368a3c60b
commit 53a99b0ff3
20 changed files with 466 additions and 16 deletions

View File

@@ -32,6 +32,17 @@ func (w *Welcomer) PrivateWelcomeMessageAuthorized(update *tgbotapi.Update, play
c.Bot.Send(msg)
}
// PrivateWelcomeMessageSpecial greets existing user with `special` access
func (w *Welcomer) PrivateWelcomeMessageSpecial(update *tgbotapi.Update, playerRaw *dbmapping.Player) {
message := "*Бот Инстинкта приветствует тебя. Снова.*\n\n"
message += "Привет, " + update.Message.From.FirstName + " " + update.Message.From.LastName + "!\n"
message += "\nБудь аккуратен, суперюзер!"
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = "Markdown"
c.Bot.Send(msg)
}
// GroupWelcomeMessage welcomes new user on group or bot itself
func (w *Welcomer) GroupWelcomeMessage(update *tgbotapi.Update) string {
newUsers := *update.Message.NewChatMembers

View File

@@ -14,5 +14,6 @@ type WelcomerInterface interface {
PrivateWelcomeMessageUnauthorized(update *tgbotapi.Update)
PrivateWelcomeMessageAuthorized(update *tgbotapi.Update, playerRaw *dbmapping.Player)
PrivateWelcomeMessageSpecial(update *tgbotapi.Update, playerRaw *dbmapping.Player)
GroupWelcomeMessage(update *tgbotapi.Update) string
}