~mendelmaleh/tg_colorbot

9db4c00e812ceb22bfc0953b4da247828d0cb357 — Mendel E 6 months ago cce3823 master
Minor updates
1 files changed, 6 insertions(+), 4 deletions(-)

M main.go
M main.go => main.go +6 -4
@@ 78,14 78,16 @@ func main() {
				ID:          c.Color,
				Title:       strings.Title(c.Color),
				Description: fmt.Sprintf("Your color is %s", c.Color),
				ThumbURL:    fmt.Sprintf("https://dummy.mendel.sh/?width=64&color=%x&color=%x", c.Background, c.Name),
				ThumbURL:    fmt.Sprintf("https://dummy.mendel.sh/?width=128&mask=diagonal&color=%x&color=%x", c.Name, c.Background),
				InputMessageContent: tgbotapi.InputTextMessageContent{
					ParseMode: "html",
					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>",
						"My color is <b>%s</b>\n - name: <code>#%x</code>\n - background: <code>#%x</code><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&desc=%s",
							q.From.ID, c.Background, c.Name, url.QueryEscape("What's my color?"),
							"https://dummy.mendel.sh/web/%d/?width=128&mask=diagonal&color=%x&color=%x&desc=%s",
							q.From.ID, c.Background, c.Name, url.QueryEscape(fmt.Sprintf(
								"What's my color?\ntop left: #%x\nbottom right: #%x", c.Name, c.Background,
							)),
						)),
					),
				},