Added guard in bot.SendMarkdownMessage as well.
This commit is contained in:
parent
d06ecc76e3
commit
5a40168769
1 changed files with 3 additions and 2 deletions
|
|
@ -106,8 +106,9 @@ func (b *bot) AttachHandlers() {
|
|||
}
|
||||
|
||||
func (b *bot) SendMarkdownMessage(chatid int64, message string) error {
|
||||
fmt.Println("bot:", b.tgbot)
|
||||
fmt.Println("bot context:", b.ctx)
|
||||
if len(message) == 0 {
|
||||
return nil
|
||||
}
|
||||
_, err := b.tgbot.SendRichMessage(b.ctx,
|
||||
&telego.SendRichMessageParams{
|
||||
ChatID: tu.ID(chatid),
|
||||
|
|
|
|||
Loading…
Reference in a new issue