Skip to content

Commit

Permalink
add telegram bot
Browse files Browse the repository at this point in the history
  • Loading branch information
le-xuan-quynh committed Oct 5, 2022
1 parent 0f69292 commit 516d454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# telegram-random-quotes

## Get telegram-bot
```bash
https://telegram.me/BotFather
```
## build
```bash
GOOS=linux GOARCH=amd64 go build /Volumes/Data/coding/golang/cronJobProject/cronjob.go
Expand Down
2 changes: 1 addition & 1 deletion cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
func callURL(message string) {
// get http with message param
if message != "" {
resp, err := http.Get("https://api.telegram.org/bot5520678085:AAE/sendMessage?chat_id=-1001880226194&text=" + message + "&parse_mode=markdown")
resp, err := http.Get("https://api.telegram.org/bot5:AAEO/sendMessage?chat_id=-100ABC&text=" + message + "&parse_mode=markdown")
if err != nil {
log.Fatalln(err)
}
Expand Down

0 comments on commit 516d454

Please sign in to comment.