Giter Site home page Giter Site logo

paulsonoflars / gotgbot Goto Github PK

View Code? Open in Web Editor NEW
439.0 23.0 102.0 981 KB

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.

License: MIT License

Go 99.64% Shell 0.36%
telegram-bot telegram-api wrapper telegram telegram-bot-api golang bot go telegram-bots miniapp

gotgbot's Introduction

Golang Telegram Bot library

Heavily inspired by the python-telegram-bot library, this package is a code-generated wrapper for the telegram bot api. We also provide an extensions package which defines an updater/dispatcher pattern to provide update processing out of the box.

All the telegram types and methods are generated from a bot api spec. These are generated in the gen_*.go files.

If you have any questions, come find us in our telegram support chat!

Features:

  • All telegram API types and methods are generated from the bot api docs, which makes this library:
    • Guaranteed to match the docs
    • Easy to update
    • Self-documenting (Re-uses pre-existing telegram docs)
  • Type safe; no weird interface{} logic, all types match the bot API docs.
  • No third party library bloat; only uses standard library.
  • Updates are each processed in their own go routine, encouraging concurrent processing, and keeping your bot responsive.
  • Code panics are automatically recovered from and logged, avoiding unexpected downtime.

Getting started

Download the library with the standard go get command:

go get github.com/PaulSonOfLars/gotgbot/v2

Example bots

Sample bots can be found in the samples directory.

Some recommended bots to look at:

Docs

Docs can be found here.

Contributing

Contributions are welcome! More information on contributing can be found here.

Regenerating the generated code.

If you've made changes to the code generation, you will probably need to regenerate the library code. This can be done simply by running go generate from the repo root. Running this will generate the code from the specification repo at the commit pinned in the spec_commit file.

To upgrade the commit in spec_commit and regenerate your code, simply run GOTGBOT_UPGRADE=true go generate. This will fetch the latest commit sha, and regenerate the library against that, giving you the latest version available.

gotgbot's People

Contributors

aliwoto avatar celestix avatar dependabot[bot] avatar dhruvkelawala avatar itzkassem avatar jaskaransm avatar liuerfire avatar megum1n avatar paulsonoflars avatar rojvv avatar shabier avatar soekarnohatta avatar tg-botsnetwork avatar ti-bone avatar vassilit avatar wemiprog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gotgbot's Issues

Adding a handler for a NewPreCheckoutQuery - no precheckoutquery.All option

Description of the problem / feature request

I am trying to add a handler for PreCheckoutQuery. When I do it for a Callback, this is the syntax:
dispatcher.AddHandler(handlers.NewCallback(callbackquery.All, processCallbackQuery))

however, for a PreCheckoutQuery, I'd expect something like

dispatcher.AddHandler(handlers.NewPreCheckoutQuery(precheckoutquery.All, processPreCheckoutQuery))

but I didn't find it. Instead, I found 2 shippingquery.All - one, for ShippingQuery itself, which seems legit. 2nd is for PreCheckoutQuery, but under package ShippingQuery

Screenshot 2024-07-03 at 16 49 27

InlineKeyboardRow

Hi Paul,

I am wondering, how do you implement ReplyMarkup that has buttons not in a row, but under each other?

The below code places then one after another in a row.

InlineKeyboard: [][]gotgbot.InlineKeyboardButton{{
				{Text: "btn1", CallbackData: "data1"},
				{Text: "btn2", CallbackData: "data2"},
				{Text: "btn3", CallbackData: "data3"},
			}},

I am trying to find is there something like InlineKeyboardRow?

Use update channel and dispather separately

Is it possible to initialize a update channel by myself so that a certain api writes update messages to the channel?

The purpose is that dispathers which are run on mutilple instances can get messages from the update channel.

In python-telegram-bot, the update_queue can be accessed out of the updater class.

webhook dosen't work

webhookDomain :="45.62.123.123"
	webhookSecret:="123456"
	if webhookDomain != "" {
		err := startWebhookBots(global.Updater,bots, webhookDomain, webhookSecret)
		if err != nil {
			panic("Failed to start bots via webhook: " + err.Error())
		}

	} else {
		err := startLongPollingBots(global.Updater, bots)
		if err != nil {
			logrus.Errorln("Failed to start bots via polling: " + err.Error())
			// panic("Failed to start bots via polling: " + err.Error())
		}
	}

when i send message to bot,did't get any response

The chatId parameter of GetChat method does not accept string

Hi, the official Telegram docs accept strings, but in this implementation, we can't pass a string.
https://core.telegram.org/bots/api#getchat

func (bot *Bot) GetChat(chatId int64, opts *GetChatOpts) (*Chat, error) {
	v := map[string]string{}
	v["chat_id"] = strconv.FormatInt(chatId, 10)

	var reqOpts *RequestOpts
	if opts != nil {
		reqOpts = opts.RequestOpts
	}

	r, err := bot.Request("getChat", v, nil, reqOpts)
	if err != nil {
		return nil, err
	}

	var c Chat
	return &c, json.Unmarshal(r, &c)
}

Does not include parameters which their values are an empty string in requests

Description of the problem / feature request

gotgbot does not include parameters which their values are an empty string ("") in the request being sent to Telegram, meanwhile some parameters can be empty strings, for example: switch_inline_query & switch_inline_query_current_chat when sending a message.

Bugs

This code tries to send a message with a switch inline button with a parameter with an empty value, but as mentioned, gotgbot ignores the parameter with the empty value and just includes the text parameter, and causes the following error: Bad Request: can't parse inline keyboard button: Text buttons are unallowed in the inline keyboard.

package main

import (
	"github.com/PaulSonOfLars/gotgbot/v2"
	"github.com/PaulSonOfLars/gotgbot/v2/ext"
	"github.com/PaulSonOfLars/gotgbot/v2/ext/handlers"
	"net/http"
)

func main() {
	b, err := gotgbot.NewBot("BOT_TOKEN", &gotgbot.BotOpts{
		Client:      http.Client{},
		GetTimeout:  gotgbot.DefaultGetTimeout,
		PostTimeout: gotgbot.DefaultPostTimeout,
	})
	if err != nil {
		panic(err)
	}
	updater := ext.NewUpdater(nil)
	dispatcher := updater.Dispatcher
	dispatcher.AddHandler(handlers.NewCommand("start", func(b *gotgbot.Bot, ctx *ext.Context) error {
		ctx.EffectiveMessage.Reply(
			b,
			".",
			&gotgbot.SendMessageOpts{
				ReplyMarkup: gotgbot.InlineKeyboardMarkup{
					InlineKeyboard: [][]gotgbot.InlineKeyboardButton{
						{
							gotgbot.InlineKeyboardButton{
								Text:              ".",
								SwitchInlineQuery: "",
							},
						},
					},
				},
			})
		return nil
	}))
	err = updater.StartPolling(b, &ext.PollingOpts{DropPendingUpdates: true})
	if err != nil {
		panic(err)
	}
	updater.Idle()
}

System information:

  • Output of go version: v1.16.4
  • Library version (as seen in go.mod file): v2.0.0-beta9.0.20210524185244-d0297001844d

'Bot.SendMessage' does not support target channel username

Description of the problem / feature request

This is the method signature of 'SendMessage' function of Bot:

func (bot *Bot) SendMessage(chatId int64, text string, opts *SendMessageOpts) (*Message, error)

And the description of 'chatId' input parameter:

- chatId (type int64): Unique identifier for the target chat or username of the target channel (in the format @channelusername)

We have no way to pass channel username (which is a string), but only chat ID is supported.

Feature requests

Fix the generation tool to generate correct 'SendMessage' implementation code that accepts 'chatId' as integer or string.

Question: metricsBot

Hi @PaulSonOfLars

I got enthusiastic about your example of metricsBot, indeed would be good to expose some prom metrics for scraping.

However, if I am using the webhook strategy, so

  1. webhookOpts := ext.WebhookOpts{
    ListenAddr: "ip:" + port,
    SecretToken: token,
    }
  2. updater.StartWebhook(bot, webhookPath, webhookOpts)
  3. updater.SetAllBotWebhooks

How do I enable metrics to sit, i.e. on metricsPath?

I understand by using your example, by adding Processor into dispatcher and starting monitorDispatcherBuffer, it will collect metrics. The question is, how to expose it on another path, that will give metrics on GET request, and not telegram messages to webhook.

AllowReEntry not working

I am having trouble with AllowReEntry in ConversationOpts.

func GetConversationStarters() []ext.Handler {
	return []ext.Handler{
		handlers.NewCommand("start", start),
	}
...
dispatcher.AddHandler(handlers.NewConversation(
GetConversationStarters(),
GetConversationHandlers(),
&handlers.ConversationOpts{
	Exits:        []ext.Handler{handlers.NewCommand("cancel", cancel)},
	...
	AllowReEntry: true,
     },
))

It is set to true, however I can't get it to work and the conversation does not restart.
From my expectations, /start command should be working regardless of the current state.

User data is not kept in the context between updates

Description of the problem / feature request

d.ProcessUpdate(b, &upd, nil) is always invoked with data = nil, and thus it effectively clears up the user data after each update.

func (d *Dispatcher) ProcessRawUpdate(b *gotgbot.Bot, r json.RawMessage) error {
	var upd gotgbot.Update
	if err := json.Unmarshal(r, &upd); err != nil {
		return fmt.Errorf("failed to unmarshal update: %w", err)
	}

	return d.ProcessUpdate(b, &upd, nil)
}

// ProcessUpdate iterates over the list of groups to execute the matching handlers.
func (d *Dispatcher) ProcessUpdate(b *gotgbot.Bot, update *gotgbot.Update, data map[string]interface{}) (err error) {
	ctx := NewContext(update, data)

Incorrect File URL Generation When Using UseTestEnvironment

Description

When the UseTestEnvironment flag is enabled, the generated URL does not account for this flag, leading to incorrect URL being produced.

Steps to Reproduce

  1. Enable the UseTestEnvironment flag in the bot.
  2. Attempt to generate a file download URL using the GetURL method.
    func (f File) GetURL(b *Bot) string {
    return fmt.Sprintf("%s/file/bot%s/%s", b.GetAPIURL(), b.GetToken(), f.FilePath)
    }

System information:

  • Library version: v2.0.0-rc.20

A suggestion

I hope the go get -u command can retrieve the most recently modified version, but currently it always gets the latest tagged version. I hope to fix this, so that if there is no new tag created, it can directly update to the latest commit, so that users can directly use the latest version when updating the code, without needing too many extra operations.

Creater doesn't has admin permissions

Hi! Bot think, that creater doesn't have permissions, but he has it!
For example, I tested CanRestrictMembers. Bot said false for creater. Bot said true for other admins.

func test(b ext.Bot, u *gotgbot.Update) error {
	member, err := u.Message.Chat.GetMember(u.Message.From.Id)
	_, err = b.SendMessage(u.Message.Chat.Id, strconv.FormatBool(member.CanRestrictMembers))
	return err
}

Token handling

Description of the problem / feature request

Hello, how to handle the moment when the token stops working while Polling is already running

Feature requests

I want to handle the moment when the token revoke

Bugs


func startBot(token string, wg *sync.WaitGroup) {
	defer wg.Done()

	bot, err := gotgbot.NewBot(token, nil)
	if err != nil {
		if strings.Contains(err.Error(), "Unauthorized") {
			log.Printf("Invalid token for bot: %s", token)
			return
		}
		log.Printf("Failed to create a bot with the token %s: %v", token, err)
		return
	}
	dispatcher := ext.NewDispatcher(&ext.DispatcherOpts{
		// If an error is returned by a handler, log it and continue going.
		Error: func(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction {
			log.Println("an error occurred while handling update:", err.Error())
			return ext.DispatcherActionNoop
		},
		MaxRoutines: ext.DefaultMaxRoutines,
	})

	dispatcher.AddHandler(handlers.NewCommand("start", handler.Start))

	updater := ext.NewUpdater(dispatcher, nil)
	err = updater.StartPolling(bot, &ext.PollingOpts{
		DropPendingUpdates: true,
		GetUpdatesOpts: &gotgbot.GetUpdatesOpts{
			Timeout: 9,
			RequestOpts: &gotgbot.RequestOpts{
				Timeout: time.Second * 10,
			},
		},
	})
	if err != nil {
		log.Printf("Не удалось запустить polling для бота с токеном %s: %v", token, err)
	}
	log.Printf("%s bot launched", bot.User.Username)
	updater.Idle()
}

System information:

  • Operating System + version: Windows 10
  • Output of go version: go1.21.0 windows/amd64
  • Library version (as seen in go.mod file): v2.0.0-rc.28

"From" is not a pointer type in all but Message structs

in gen_types.go

The struct Message has
From *User json:"from,omitempty"``

However the struct CallbackQuery has
From User json:"from"``

Is there a reason to not have "From" as a pointer type in CallbackQuery (and other than Message queries)?

Error: Unexpected end of JSON input in webhook mode

Hi! I updated you package and got this error in logs:

level=info msg="Starting webhook"
level=fatal msg="Failed to start bot due to: unexpected end of JSON input" error="unexpected end of JSON input"

If bot use Long Polling mode, it work without any errors.

No proxy support: context deadline exceeded

Description of the problem / feature request

run gotgbot.NewBot panic : failed to execute GET request to getMe: context deadline exceeded

System information:

  • Operating System + version: windows 10
  • Output of go version: 1.16.2
  • Library version (as seen in go.mod file): v2.0.0-beta6

Any other information, logs, or outputs that you would like to share?

If you have large files to share, please upload as attachment, or provide a (public) link.

Get chat users list

Hi! How to get chat users list? It is needed for saving id and username of users in database.

error occurs in the HandleUpdate function of the CallbackQuery package

Bugs

we have error from here i'm not sure about golang, but our bot mention that this line when we try to change bot languages :

github.com/PaulSonOfLars/gotgbot/v2/ext/handlers.CallbackQuery.HandleUpdate(...)
/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/PaulSonOfLars/gotgbot/v2/ext/handlers.CallbackQuery.HandleUpdate(...)
/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/callbackquery.go:25
/ext/handlers/callbackquery.go:25

System information:

  • Operating System + ubuntu latest
  • Output of go version: v2.0.0-rc20
  • Library version (as seen in go.mod file): vgo1.19

Any other information, logs, or outputs that you would like to share?

this is error log when we click our bot languages change button, also our button isn't work too.

github.com/PaulSonOfLars/gotgbot/v2/ext/handlers.CallbackQuery.HandleUpdate(...)
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/callbackquery.go:25
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).iterateOverHandlerGroups(0x4000191c20, 0x0?, 0x1?)
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:270 +0x134
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).ProcessUpdate(0x4000191c20, 0x40001a4e00, 0x500?, 0x78b0c0?)
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:256 +0x8c
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).ProcessRawUpdate(0x0?, 0x40005aa4e0?, {0x40002d0f00, 0x4b9, 0x500})
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:234 +0xac
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).Start.func1({0x40002d0f00?, 0x78244?, 0x0?})
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:191 +0x6c
created by github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).Start
        /go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:181 +0x34

Thank you

It's hard to believe that such a great project has so few stars. I've tried several Go Telegram bot-related API projects, and this one is the best. I truly appreciate it. I hope it will continue to be updated consistently.

Consider transforming the Dispatcher inside the Updater structure into an Interface?

【Feature requests】

I have a modification requirement and I want to reuse the code of Updater Polling, but I need to change the logic of Dispatcher.

Currently, Dispatcher is a struct field inside Update, which prevents me from implementing custom routing logic inside Dispatcher. So I want to define Dispatcher as an interface.

May I ask what are the considerations for defining Dispatcher as a struct currently? If you have considered this modification, I can contribute code for you; otherwise, I will have to modify this project myself.

Dispatcher

make Dispatcher support middleware stack

Currently if we want some middlewares for the dispatcher, we must write like this:

func middleware(next handlers.Response) handlers.Response {
	fn := func(b *gotgbot.Bot, ctx *ext.Context) error {
                fmt.Println("I'm in a middleware")
		return next(b, ctx)
	}
	return fn
}

dispatcher.AddHandler(handlers.NewCommand("start", middleware(start)))
dispatcher.AddHandler(handlers.NewCommand("help", middleware(help)))

If there're lots of middlewares, then this will be like:

dispatcher.AddHandler(handlers.NewCommand("start", middleware1(middleware2(start))))
dispatcher.AddHandler(handlers.NewCommand("help", middleware1(middleware2(help))))

and this is tedious.

How about add a help method to support middleware stack, something like:

dispatcher.Use(middleware1)
dispatcher.Use(middleware2)

dispatcher.AddHandler(handlers.NewCommand("start", start))

what do you think? If you're ok with this, I think I can make a PR.

Panic on invoice payment submission

Steps:

  1. An invoice is created (see handlePayment)
  2. A user enters credit card info and submits the payment
  3. The library panics. See the stack trace

Setup

...
	telegramBot, err := gotgbot.NewBot(telegramBotToken, nil)
	if err != nil {
		panic("failed to create new bot: " + err.Error())
	}
	// Create updater and dispatcher.
	dispatcher := ext.NewDispatcher(&ext.DispatcherOpts{
		// If an error is returned by a handler, log it and continue going.
		Error: func(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction {
			log.Println("an error occurred while handling update:", err.Error())
			return ext.DispatcherActionNoop
		},
		MaxRoutines: ext.DefaultMaxRoutines,
	})
	updater := ext.NewUpdater(dispatcher, nil)

	dispatcher.AddHandler(handlers.NewConversation(
		[]ext.Handler{
			...
			handlers.NewCommand("payment", handlePayment), // This handler
		},
		map[string][]ext.Handler{
			...
		},
		&handlers.ConversationOpts{
			...
		},
	))
...
func handlePayment(b *gotgbot.Bot, ctx *ext.Context) error {
	_, err := b.SendInvoice(
		ctx.EffectiveChat.Id,
		"Purchase points",
		"Buy 1000 points",
		"payload1000",
		paymentToken,
		"USD",
		[]gotgbot.LabeledPrice{
			{
				Label:  "pay1000",
				Amount: 10 * 100,
			},
		},
		nil,
	)
	if err != nil {
		return fmt.Errorf("failed to send invoice: %w", err)
	}
       // Panic after this

	return handlers.EndConversation()
}

Stack trace

2023/12/24 00:50:36 Failed to process update: panic recovered: runtime error: invalid memory address or nil pointer dereference
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:344 +0x1c
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).ProcessUpdate.func1()
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:282 +0x64
panic({0x1047e9a40?, 0x1049c9290?})
        /usr/local/go/src/runtime/panic.go:914 +0x218
github.com/PaulSonOfLars/gotgbot/v2/ext/handlers/conversation.StateKey(0x140002a3dd0, 0x12?)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/conversation/common.go:20 +0x98
github.com/PaulSonOfLars/gotgbot/v2/ext/handlers/conversation.(*InMemoryStorage).Get(0x1400007d2c0, 0x104530bc8?)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/conversation/in_memory.go:31 +0x48
github.com/PaulSonOfLars/gotgbot/v2/ext/handlers.Conversation.getNextHandler({{0x14000062200, 0x2, 0x2}, 0x1400007d290, {0x10483c880, 0x1400007d2c0}, {0x14000012540, 0x1, 0x1}, {0x0, ...}, ...}, ...)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/conversation.go:173 +0x70
github.com/PaulSonOfLars/gotgbot/v2/ext/handlers.Conversation.CheckUpdate(...)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/handlers/conversation.go:74
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).iterateOverHandlerGroups(0x14000134200, 0x1047cdac0?, 0x14000134300?)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:297 +0x114
github.com/PaulSonOfLars/gotgbot/v2/ext.BaseProcessor.ProcessUpdate(...)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/processor.go:20
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).ProcessUpdate(0x14000134200, 0x14000134000, 0x100?, 0x1047cdac0?)
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:288 +0x9c
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).processRawUpdate(0x0?, 0x0?, {0x1400008c200, 0xf3, 0x100})
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:265 +0xac
github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).Start.func1({0x1400008c200?, 0x10458bbe4?, 0x140001f0000?})
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:213 +0x6c
created by github.com/PaulSonOfLars/gotgbot/v2/ext.(*Dispatcher).Start in goroutine 23
        /Users/bazuker/go/pkg/mod/github.com/!paul!son!of!lars/gotgbot/[email protected]/ext/dispatcher.go:203 +0x38

question: Don't work on heroku

Hi! I adapted program for webhooks and it doesn't work.
My commit.
So... I installed webhook.
https://api.telegram.org/botBOT_TOKEN/setWebhook?url=https://calm-cove-01177.herokuapp.com/BOT_TOKEN
I got "last_error_message":"Wrong response from the webhook: 503 Service Unavailable","max_connections":40
I see this in logs
2020-03-17T10:31:01.929783+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/BOT_TOKEN" host=calm-cove-01177.herokuapp.com request_id=11ab7aec-5bdb-4a55-900d-9dd87844f834 fwd="91.108.6.99" dyno= connect= service= status=503 bytes= protocol=https
I don't have any idea how to fix it.

API 7.5 support

Hi Paul,

And thanks for your efforts maintaining the API. I saw there is a branch, but was curious, what are your plans on releasing the API 7.5 support?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.