Archived
1

Add debug to message sending commands

This commit is contained in:
Vladimir Hodakov 2018-03-31 17:39:58 +04:00
parent 06173451f6
commit 8af3e5b03a

View File

@ -9,6 +9,7 @@ import (
// SendMarkdownAnswer sends markdown-powered message as answer
func (s *Sender) SendMarkdownAnswer(update *tgbotapi.Update, message string) {
c.Log.Debug("Sending Markdown answer...")
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = parseMode
@ -20,6 +21,7 @@ func (s *Sender) SendMarkdownAnswer(update *tgbotapi.Update, message string) {
// SendMarkdownMessageToChatID sends markdown-powered message to specified chat
func (s *Sender) SendMarkdownMessageToChatID(chatID int64, message string) {
c.Log.Debug("Sending Markdown message to specified chat...")
msg := tgbotapi.NewMessage(chatID, message)
msg.ParseMode = parseMode
@ -31,6 +33,7 @@ func (s *Sender) SendMarkdownMessageToChatID(chatID int64, message string) {
// SendMarkdownReply sends markdown-powered message as reply
func (s *Sender) SendMarkdownReply(update *tgbotapi.Update, message string, messageID int) {
c.Log.Debug("Sending Markdown reply...")
msg := tgbotapi.NewMessage(update.Message.Chat.ID, message)
msg.ParseMode = parseMode
msg.ReplyToMessageID = messageID