projects
/
sylphiette-bot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ac4d15
)
send photo function
author
Eduardo
<
[email protected]
>
Thu, 28 Mar 2024 02:34:09 +0000
(
03:34
+0100)
committer
Eduardo
<
[email protected]
>
Thu, 28 Mar 2024 02:34:09 +0000
(
03:34
+0100)
bot.go
patch
|
blob
|
history
diff --git
a/bot.go
b/bot.go
index 7526a295c34b96e69aef76de94ade94d5ec9d692..31717cfa479c8c901485a5d8c7d211981da21076 100644
(file)
--- a/
bot.go
+++ b/
bot.go
@@
-201,6
+201,13
@@
func sendTelegramMessage(chatId int64, text string) error {
_, err := telegram.Send(msg)
return err
}
+func sendTelegramPhoto(chatId int64, photo string, text string) error {
+ msg := tgbotapi.NewPhoto(chatId, tgbotapi.FileURL(photo))
+ msg.ParseMode = tgbotapi.ModeHTML
+ msg.Caption = text
+ _, err := telegram.Send(msg)
+ return err
+}
func handleButton(query *tgbotapi.CallbackQuery) {
var text string