Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
65947da
Added `live_period` for Location
pr0head Oct 13, 2017
7031d82
Added `live_period` for Location (tests)
pr0head Oct 13, 2017
5cbecde
Added `editMessageLiveLocation` and `stopMessageLiveLocation` methods
pr0head Oct 13, 2017
dffc002
Fix struct for InlineQueryResultLocation
pr0head Oct 17, 2017
e97c241
Resolve some linter issues.
Syfaro Dec 29, 2017
271adc4
Bot API 3.2, introduce Request to replace APIResponse methods.
Syfaro Dec 29, 2017
95a923d
Update tests.
Syfaro Dec 29, 2017
ac87082
Remove remaining methods that returned an APIResponse.
Syfaro Dec 29, 2017
ef37464
Bot API 3.3.
Syfaro Dec 29, 2017
8b7b15a
Update README.md.
Syfaro Dec 29, 2017
0a654be
Move debug output into a single location.
Syfaro Dec 29, 2017
4ec899a
Merge remote-tracking branch 'pr0head/master' into develop
Syfaro Dec 29, 2017
72f87b4
Fix backwards compatibility for Live Location.
Syfaro Dec 29, 2017
e840fa3
Finish Bot API 3.4.
Syfaro Dec 29, 2017
bb07769
Bot API 3.5.
Syfaro Dec 29, 2017
c268ddc
Fix comments that were copied.
Syfaro Dec 29, 2017
9653a4a
Handle some ignored errors.
Syfaro Dec 30, 2017
6a6de7e
Merge master into develop.
Syfaro Mar 26, 2018
1aef8c8
Remove new methods that returned APIResponse.
Syfaro Mar 26, 2018
b728fa7
More various small code quality improvements.
Syfaro Mar 26, 2018
23ed97b
Merge master into develop.
Syfaro Oct 8, 2018
9d2d117
Merge branch 'master' into develop
Syfaro Oct 8, 2018
03815bf
Unify params and values, introduce helpers to deal with fields.
Syfaro Oct 8, 2018
655c3a4
Remove outdated and old comments.
Syfaro Oct 8, 2018
1f85967
Consistency of variable names.
Syfaro Oct 8, 2018
4d758f1
Add some missing fields, generalize configs, remove unneeded methods.
Syfaro Oct 9, 2018
cdcb93d
No reason to use pointers to arrays.
Syfaro Oct 9, 2018
a746f39
Move tests into tgbotapi package.
Syfaro Oct 9, 2018
afda722
Remove unused error returned by GetUpdatesChan.
Syfaro Oct 9, 2018
290b936
Fix bot_test.go, update README.
Syfaro Oct 9, 2018
5781187
Add go mod files.
Syfaro Oct 9, 2018
a0a6783
fix uploads by URL and fileId, should be the same as in createNewStic…
Nov 28, 2018
5d997a7
fix uploads by URL and fileId for UploadStickerConfig too, should be …
Dec 6, 2018
cb3a14a
fix error handling for uploadFile calls
Dec 8, 2018
fa40708
Add SendMediaGroup method.
Syfaro Dec 25, 2018
db88019
Add support for Polls and other API 4.2 updates.
Syfaro Apr 14, 2019
ffe77fb
Updates for Bot API 4.3.
Syfaro Jun 1, 2019
696aebd
Uploading photo to a channel functionality added.
zergon321 Sep 1, 2019
aaaa278
My own bot is used to test the added functionality.
zergon321 Sep 2, 2019
43b3f0a
Add helper for InlineKeyboardButtonLoginURL
antsupovsa Sep 6, 2019
5ce2767
Updates for Bot API 4.4 and 4.5.
Syfaro Jan 6, 2020
5aaa0b2
Bot API 4.6: Polls 2.0, misc. changes
tjhorner Jan 25, 2020
ddf0d36
Use Params#AddBool for is_closed
tjhorner Jan 25, 2020
3635031
Merge pull request #302 from tjhorner/polls
Syfaro Jan 27, 2020
e18071b
Add FileUniqueID to ChatAnimation (ref. https://core.telegram.org/bot…
AlessandroPomponio Feb 8, 2020
b40fac9
Resolve develop and master conflicts
zhuharev Feb 15, 2020
6fcca60
Fix old package import
zhuharev Feb 15, 2020
b16df76
Merge pull request #307 from go-telegram-bot-api/resolve-develop-conf…
zhuharev Feb 15, 2020
047d735
Merge pull request #305 from AlessandroPomponio/animation-unique-id
zhuharev Feb 16, 2020
4a76ae1
Create helper function WriteToHTTPResponse
CNA-Bld Mar 2, 2020
6ce4ec7
Merge pull request #312 from CNA-Bld/write-to-http-response
zhuharev Mar 19, 2020
75e27e1
Updates for Bot API 4.7.
Syfaro Mar 30, 2020
53dec07
removed redundant t.Fail() from bot_test.go
Apr 6, 2020
774f1e7
Updates for Bot API 4.8.
Syfaro Apr 24, 2020
5b3f2f3
Added omitempty tag for clean JSON marshaling
biodranik May 11, 2020
38c2cb1
Merge pull request #336 from biodranik/improvements
zhuharev May 24, 2020
da98517
Merge pull request #210 from overplumbum/develop
Syfaro Jul 21, 2020
ab39746
Replace test channel ID.
Syfaro Jul 21, 2020
ca07bb7
Added HandleUpdate method for serverless deploy
Gropher Sep 18, 2019
63cbbdc
Add missing chat action constants.
Syfaro Jul 21, 2020
1059fc7
Delete a message in a channel
ros-tel Jul 19, 2020
50bcf10
Update sendDice helpers.
Syfaro Jul 21, 2020
4f6c0f1
add MarkdownV2
greenx Jul 1, 2020
49a467b
Introduce NewOneTimeReplyKeyboard() helper function
rozha Aug 11, 2019
1bdfd4d
Update comment on NewOneTimeReplyKeyboard.
Syfaro Jul 21, 2020
bd27dae
Fix nil pointer on User String method
pachmu May 22, 2020
1930c25
add ability to respond to inline queries with stickers
Jan 5, 2020
ca09b25
Add MaxConnections to WebhookInfo
yi-jiayu Jan 13, 2020
c87d411
Mark WebhookInfo.MaxConnections as optional
yi-jiayu Jul 21, 2020
458a897
Change assertion failure message
yi-jiayu Jul 21, 2020
6b0d3ce
Fix some lints.
Syfaro Jul 21, 2020
5598dbc
Remove old Go versions from Travis.
Syfaro Jul 22, 2020
9d3974d
Merge pull request #261 from zergon321/add-photo-upload-channel
Syfaro Jul 22, 2020
4acb1ce
Merge pull request #321 from ErrorBoi/cleanup-bot-test
Syfaro Jul 23, 2020
e599156
Tidy go mod files.
Syfaro Jul 23, 2020
2f7211a
Updates for Bot API 4.9.
Syfaro Jul 23, 2020
ce4fc98
Add support for uploading multiple files.
Syfaro Jul 26, 2020
99b74b8
Improve usability of new files for configs.
Syfaro Jul 26, 2020
c6bf64c
Replace panic with CloseWithError.
Syfaro Jul 26, 2020
8d14bd7
Make MediaGroupConfig Chattable and Fileable.
Syfaro Jul 26, 2020
a45216f
Generalize InputMedia, fix editMessageMedia.
Syfaro Jul 26, 2020
f2cd956
Update some forgotten items.
Syfaro Jul 26, 2020
5be2526
Initial work on improving docs.
Syfaro Jul 26, 2020
67c5217
Attempt to use GitHub Actions.
Syfaro Jul 27, 2020
69a8270
Handle error in NewWebhook and NewWebhookWithCert
Eivel Sep 30, 2020
e6e2a9f
Update Go version, fix duplicate runs.
Syfaro Nov 5, 2020
b52a939
Fix Imgur issue.
Syfaro Nov 5, 2020
18c023f
Merge pull request #359 from go-telegram-bot-api/github-actions
Syfaro Nov 5, 2020
ac5306c
Updates for Bot API 5.0.
Syfaro Nov 5, 2020
366879b
Merge branch 'master' into develop
Syfaro Nov 6, 2020
24e02f7
Merge branch 'develop' into bot-api-5.0
Syfaro Nov 6, 2020
4064ced
Add some tests, fix copyMessage.
Syfaro Nov 6, 2020
b163052
Handle InputMedia{Document,Audio} in media groups.
Syfaro Feb 20, 2021
24d4f79
Updates for Bot API 5.1.
Syfaro Mar 9, 2021
e03cd7f
Change UserID to int64.
Syfaro Mar 9, 2021
3b5c8a9
Add allowed_updates to GetUpdates
tjhorner Mar 9, 2021
d10c681
Merge pull request #392 from go-telegram-bot-api/bot-api-5.0
Syfaro Mar 10, 2021
05db49c
Merge branch 'develop' into multiple-uploads
Syfaro Mar 10, 2021
badaa40
Merge pull request #356 from go-telegram-bot-api/multiple-uploads
Syfaro Mar 10, 2021
0a6e349
Merge pull request #431 from go-telegram-bot-api/userid-int64
Syfaro Mar 10, 2021
a36ca53
Add to and update docs.
Syfaro Mar 10, 2021
80a1cbd
Small doc fixes.
Syfaro Mar 10, 2021
f6e5759
Add note about privacy mode.
Syfaro Mar 10, 2021
133755f
Another small docs update.
Syfaro Mar 10, 2021
53d566b
Merge pull request #375 from Eivel/develop
Syfaro Mar 11, 2021
0b0e5c0
Fix mistyped comment.
Syfaro Mar 11, 2021
284b093
Merge branch 'develop' into develop
Syfaro Mar 11, 2021
47a0a16
Fix minor capitalization issue.
Syfaro Mar 11, 2021
d0e1dfd
Merge pull request #267 from antsupovsa/develop
Syfaro Mar 11, 2021
b4a22fe
Updates for Bot API 5.2, other small fixes.
Syfaro Apr 26, 2021
2c2c95a
Merge pull request #443 from go-telegram-bot-api/bot-api-5.2
Syfaro Jun 8, 2021
fb1de2f
Merge pull request #434 from go-telegram-bot-api/develop-docs
Syfaro Jun 8, 2021
66dc9e8
Updates for Bot API 5.3.
Syfaro Jun 27, 2021
1198abd
Avoid breaking change with GetMyCommands.
Syfaro Aug 20, 2021
000cb2e
Merge pull request #460 from go-telegram-bot-api/bot-api-5.3
Syfaro Aug 20, 2021
8165320
Create interface for file data.
Syfaro Aug 20, 2021
1a3364a
Fix (and disable broken) tests.
Syfaro Aug 20, 2021
309d612
Merge branch 'master' into develop
Syfaro Aug 20, 2021
6aa0522
Merge branch 'develop' into files
Syfaro Aug 20, 2021
9e20459
Update docs.
Syfaro Aug 20, 2021
d2539d0
Update more docs.
Syfaro Aug 20, 2021
04f547b
Updates for Bot API 5.4.
Syfaro Nov 8, 2021
0d6825e
Merge pull request #486 from go-telegram-bot-api/bot-api-5.4
Syfaro Nov 8, 2021
7c82078
Merge pull request #469 from go-telegram-bot-api/files
Syfaro Nov 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test

on:
push:
branches:
- master
- develop
pull_request:

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: go build -v .

- name: Test
run: go test -coverprofile=coverage.out -covermode=atomic -v .

- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
file: ./coverage.out
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
coverage.out
tmp/
book/
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

55 changes: 1 addition & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,60 +62,7 @@ func main() {
}
```

There are more examples on the [wiki](https://github.com/go-telegram-bot-api/telegram-bot-api/wiki)
There are more examples on the [site](https://go-telegram-bot-api.github.io/)
with detailed information on how to do many different kinds of things.
It's a great place to get started on using keyboards, commands, or other
kinds of reply markup.

If you need to use webhooks (if you wish to run on Google App Engine),
you may use a slightly different method.

```go
package main

import (
"log"
"net/http"

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

func main() {
bot, err := tgbotapi.NewBotAPI("MyAwesomeBotToken")
if err != nil {
log.Fatal(err)
}

bot.Debug = true

log.Printf("Authorized on account %s", bot.Self.UserName)

_, err = bot.SetWebhook(tgbotapi.NewWebhookWithCert("https://www.google.com:8443/"+bot.Token, "cert.pem"))
if err != nil {
log.Fatal(err)
}
info, err := bot.GetWebhookInfo()
if err != nil {
log.Fatal(err)
}
if info.LastErrorDate != 0 {
log.Printf("Telegram callback failed: %s", info.LastErrorMessage)
}
updates := bot.ListenForWebhook("/" + bot.Token)
go http.ListenAndServeTLS("0.0.0.0:8443", "cert.pem", "key.pem", nil)

for update := range updates {
log.Printf("%+v\n", update)
}
}
```

If you need, you may generate a self signed certficate, as this requires
HTTPS / TLS. The above example tells Telegram that this is your
certificate and that it should be trusted, even though it is not
properly signed.

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3560 -subj "//O=Org\CN=Test" -nodes

Now that [Let's Encrypt](https://letsencrypt.org) is available,
you may wish to generate your free TLS certificate there.
9 changes: 9 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[book]
authors = ["Syfaro"]
language = "en"
multilingual = false
src = "docs"
title = "Go Telegram Bot API"

[output.html]
git-repository-url = "https://github.com/go-telegram-bot-api/telegram-bot-api"
Loading