all repos — telegram-bot-api @ aaaa278b563e4e344a0e9440591347371801f2f1

Golang bindings for the Telegram Bot API

My own bot is used to test the added functionality.
nightghost maximgradan@gmail.com
Mon, 02 Sep 2019 18:44:35 +0300
commit

aaaa278b563e4e344a0e9440591347371801f2f1

parent

696aebd64c3d29da9d41a6a0ee24c1f32e278041

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M bot_test.gobot_test.go

@@ -11,6 +11,7 @@

const ( TestToken = "153667468:AAHlSHlMqSt1f_uFmVRJbm5gntu2HI4WW8I" ChatID = 76918703 + ChannelBot = "903278594:AAHmLoQncKOMKz2A644-cIK1Sb0VwfnOpGQ" Channel = "@nightghost_test" SupergroupChatID = -1001120141283 ReplyToMessageID = 35

@@ -155,7 +156,7 @@ }

} func TestSendNewPhotoToChannel(t *testing.T) { - bot, _ := getBot(t) + bot, _ := NewBotAPI(ChannelBot) msg := NewPhotoUploadToChannel(Channel, "tests/image.jpg") msg.Caption = "Test"

@@ -168,7 +169,7 @@ }

} func TestSendNewPhotoToChannelFileBytes(t *testing.T) { - bot, _ := getBot(t) + bot, _ := NewBotAPI(ChannelBot) data, _ := ioutil.ReadFile("tests/image.jpg") b := FileBytes{Name: "image.jpg", Bytes: data}

@@ -184,7 +185,7 @@ }

} func TestSendNewPhotoToChannelFileReader(t *testing.T) { - bot, _ := getBot(t) + bot, _ := NewBotAPI(ChannelBot) f, _ := os.Open("tests/image.jpg") reader := FileReader{Name: "image.jpg", Reader: f, Size: -1}