~mendelmaleh/tg_colorbot

cce38233eec481c4c66b3ef8b42d9a824705910e — Mendel E 11 months ago eeda176
Add web preview description
1 files changed, 3 insertions(+), 2 deletions(-)

M main.go
M main.go => main.go +3 -2
@@ 5,6 5,7 @@ import (
	"html"
	"io/ioutil"
	"log"
	"net/url"
	"strings"

	tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"


@@ 83,8 84,8 @@ func main() {
					Text: fmt.Sprintf(
						"Your color is <b>%s</b>\n - name: <code>#%x</code>\n - background: <code>#%x</code>\n<a href=\"%s\">&#8203;</a>",
						c.Color, c.Name, c.Background, html.EscapeString(fmt.Sprintf(
							"https://dummy.mendel.sh/web/%d/?width=64&color=%x&color=%x",
							q.From.ID, c.Background, c.Name,
							"https://dummy.mendel.sh/web/%d/?width=64&color=%x&color=%x&desc=%s",
							q.From.ID, c.Background, c.Name, url.QueryEscape("What's my color?"),
						)),
					),
				},