Added guard in bot.SendMarkdownMessage as well.

This commit is contained in:
Benjamin A. Shelton 2026-11-09 14:26:18 -07:00
commit 5a40168769
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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),