parent
commit
547a98f006
  1. 2
      go.mod
  2. 9
      main.go

2
go.mod

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
module mod
module ssender
go 1.17

9
main.go

@ -3,7 +3,6 @@ package main @@ -3,7 +3,6 @@ package main
import (
"encoding/json"
"encoding/xml"
"html"
"html/template"
"log"
"os"
@ -177,10 +176,10 @@ func (config Config) RunSend() { @@ -177,10 +176,10 @@ func (config Config) RunSend() {
}
bot.Debug = config.Telegram.SendDebug
s := "<b>" + string(v.Title) + "</b>\n" + html.UnescapeString(string(v.Description)) +
"\nhttps://t.me/iv?url=" + v.Link + "&rhash=da76512d0ff2a2" +
"\n\nСсылка на пост: " + v.Link
msg := tgbotapi.NewMessage(config.Telegram.ChatId, s)
// s := "<b>" + string(v.Title) + "</b>\n" + html.UnescapeString(string(v.Description)) +
// "\nhttps://t.me/iv?url=" + v.Link + "&rhash=da76512d0ff2a2" +
// "\n\nСсылка на пост: " + v.Link
msg := tgbotapi.NewMessage(config.Telegram.ChatId, v.Link)
msg.ParseMode = "Html"
_, err = bot.Send(msg)
if err != nil {

Loading…
Cancel
Save