Td: TDlib bot handling

Created on 1 May 2018  路  5Comments  路  Source: tdlib/td

Hello!
TDlib can handle telegram bots, but is it just wrapper for existing bot api or I can use any "Telegram API" method and not only handle updates?

Most helpful comment

I parse it to json schema
https://github.com/zelenin/go-tdlib/blob/c780ca35c418c009606df33a9bfea6c29bdfea4b/data/td_api.json#L10632
That's functions with type 1 (common) and type 3 (only bot)

All 5 comments

Bot API is just an HTTP wrapper for TDLib, but it doesn't mean that bots can use any Telegram API method. Bots are allowed to use only methods, required for implementing Bot API and effectively available through Bot API.

Hi @levlam I want to know which method can be used by bot. But API doc seems not point out. How can I find bot method? Thanks.

It isn't documented anywhere to reduce documentation size. To check whether specific method is available for bots, you can look in the source code of Td.cpp and check, whether corresponding on_request method has no "CHECK_IS_USER();".

@levlam Ok锛孴hanks.

I parse it to json schema
https://github.com/zelenin/go-tdlib/blob/c780ca35c418c009606df33a9bfea6c29bdfea4b/data/td_api.json#L10632
That's functions with type 1 (common) and type 3 (only bot)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sh-a-v picture sh-a-v  路  3Comments

hatami57 picture hatami57  路  4Comments

rdlrt picture rdlrt  路  3Comments

kossnocorp picture kossnocorp  路  3Comments

devxpy picture devxpy  路  5Comments