/academy and /bastion: some error messages
This commit is contained in:
		| @@ -52,10 +52,10 @@ func (r *Router) routePrivateRequest(update *tgbotapi.Update, playerRaw *dbmappi | ||||
| 				c.Talkers.HelpMessage(update, playerRaw) | ||||
| 				return "ok" | ||||
| 			case update.Message.Command() == "academy": | ||||
| 				c.Talkers.AcademyMessage(update) | ||||
| 				c.Talkers.AcademyMessage(update, playerRaw) | ||||
| 				return "ok" | ||||
| 			case update.Message.Command() == "bastion": | ||||
| 				c.Talkers.BastionMessage(update) | ||||
| 				c.Talkers.BastionMessage(update, playerRaw) | ||||
| 				return "ok" | ||||
|  | ||||
| 			case pokedexMsg.MatchString(text): | ||||
|   | ||||
| @@ -10,9 +10,17 @@ import ( | ||||
| ) | ||||
|  | ||||
| // AcademyMessage gives user link to Bastion | ||||
| func (t *Talkers) AcademyMessage(update *tgbotapi.Update) { | ||||
| 	message := "*Академия Инстинкта*\n" | ||||
| 	message += "Чат для обучения новичков предумростям игры расположен по ссылке: https://t.me/joinchat/G2vME04jk02v2etRmumylg" | ||||
| func (t *Talkers) AcademyMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) { | ||||
| 	message := "" | ||||
|  | ||||
| 	if playerRaw.LeagueID > 1 { | ||||
| 		message = "Иди нахуй, шпионское отродье" | ||||
| 	} else if playerRaw.LeagueID == 0 { | ||||
| 		message = "Заполни профиль и попробуй ещё раз" | ||||
| 	} else { | ||||
| 		message += "*Академия Инстинкта*\n" | ||||
| 		message += "Чат для обучения новичков предумростям игры расположен по ссылке: https://t.me/joinchat/G2vME04jk02v2etRmumylg" | ||||
| 	} | ||||
|  | ||||
| 	msg := tgbotapi.NewMessage(update.Message.Chat.ID, message) | ||||
| 	msg.ParseMode = "Markdown" | ||||
| @@ -21,9 +29,17 @@ func (t *Talkers) AcademyMessage(update *tgbotapi.Update) { | ||||
| } | ||||
|  | ||||
| // BastionMessage gives user link to Bastion | ||||
| func (t *Talkers) BastionMessage(update *tgbotapi.Update) { | ||||
| 	message := "*Бастион Инстинкта*\n" | ||||
| 	message += "Общий чат лиги расположен по ссылке: https://t.me/joinchat/G2vME0mIX-QHjjxE\\_JBzoQ" | ||||
| func (t *Talkers) BastionMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) { | ||||
| 	message := "" | ||||
|  | ||||
| 	if playerRaw.LeagueID > 1 { | ||||
| 		message = "Иди нахуй, шпионское отродье" | ||||
| 	} else if playerRaw.LeagueID == 0 { | ||||
| 		message = "Заполни профиль и попробуй ещё раз" | ||||
| 	} else { | ||||
| 		message += "*Бастион Инстинкта*\n" | ||||
| 		message += "Общий чат лиги расположен по ссылке: https://t.me/joinchat/G2vME0mIX-QHjjxE\\_JBzoQ" | ||||
| 	} | ||||
|  | ||||
| 	msg := tgbotapi.NewMessage(update.Message.Chat.ID, message) | ||||
| 	msg.ParseMode = "Markdown" | ||||
|   | ||||
| @@ -12,8 +12,8 @@ import ( | ||||
| type TalkersInterface interface { | ||||
| 	Init() | ||||
|  | ||||
| 	AcademyMessage(update *tgbotapi.Update) | ||||
| 	BastionMessage(update *tgbotapi.Update) | ||||
| 	AcademyMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) | ||||
| 	BastionMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) | ||||
| 	HelpMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) | ||||
|  | ||||
| 	AnyMessageUnauthorized(update *tgbotapi.Update) string | ||||
|   | ||||
		Reference in New Issue
	
	Block a user