Giter VIP home page Giter VIP logo

telegram-bot-api's Introduction

Telegram Bot API

The Telegram Bot API provides an HTTP API for creating Telegram Bots.

If you've got any questions about bots or would like to report an issue with your bot, kindly contact us at @BotSupport in Telegram.

Please note that only global Bot API issues that affect all bots are suitable for this repository.

Table of Contents

Installation

The simplest way to build and install Telegram Bot API server is to use our Telegram Bot API server build instructions generator. If you do that, you'll only need to choose the target operating system to receive the complete build instructions.

In general, you need to install all Telegram Bot API server dependencies and compile the source code using CMake:

git clone --recursive https://github.com/tdlib/telegram-bot-api.git
cd telegram-bot-api
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target install

Dependencies

To build and run Telegram Bot API server you will need:

  • OpenSSL
  • zlib
  • C++14 compatible compiler (e.g., Clang 3.4+, GCC 4.9+, MSVC 19.0+ (Visual Studio 2015+), Intel C++ Compiler 17+) (build only)
  • gperf (build only)
  • CMake (3.0.2+, build only)

Usage

Use telegram-bot-api --help to receive the list of all available options of the Telegram Bot API server.

The only mandatory options are --api-id and --api-hash. You must obtain your own api_id and api_hash as described in https://core.telegram.org/api/obtaining_api_id and specify them using the --api-id and --api-hash options or the TELEGRAM_API_ID and TELEGRAM_API_HASH environment variables.

To enable Bot API features not available at https://api.telegram.org, specify the option --local. In the local mode the Bot API server allows to:

  • Download files without a size limit.
  • Upload files up to 2000 MB.
  • Upload files using their local path and the file URI scheme.
  • Use an HTTP URL for the webhook.
  • Use any local IP address for the webhook.
  • Use any port for the webhook.
  • Set max_webhook_connections up to 100000.
  • Receive the absolute local path as a value of the file_path field without the need to download the file after a getFile request.

The Telegram Bot API server accepts only HTTP requests, so a TLS termination proxy needs to be used to handle remote HTTPS requests.

By default the Telegram Bot API server is launched on the port 8081, which can be changed using the option --http-port.

Documentation

See Bots: An introduction for developers for a brief description of Telegram Bots and their features.

See the Telegram Bot API documentation for a description of the Bot API interface and a complete list of available classes, methods and updates.

See the Telegram Bot API server build instructions generator for detailed instructions on how to build the Telegram Bot API server.

Subscribe to @BotNews to be the first to know about the latest updates and join the discussion in @BotTalk.

Moving a bot to a local server

To guarantee that your bot will receive all updates, you must deregister it with the https://api.telegram.org server by calling the method logOut. After the bot is logged out, you can replace the address to which the bot sends requests with the address of your local server and use it in the usual way. If the server is launched in --local mode, make sure that the bot can correctly handle absolute file paths in response to getFile requests.

Moving a bot from one local server to another

If the bot is logged in on more than one server simultaneously, there is no guarantee that it will receive all updates. To move a bot from one local server to another you can use the method logOut to log out on the old server before switching to the new one.

If you want to avoid losing updates between logging out on the old server and launching on the new server, you can remove the bot's webhook using the method deleteWebhook, then use the method close to close the bot instance. After the instance is closed, locate the bot's subdirectory in the working directory of the old server by the bot's user ID, move the subdirectory to the working directory of the new server and continue sending requests to the new server as usual.

License

Telegram Bot API server source code is licensed under the terms of the Boost Software License. See LICENSE_1_0.txt for more information.

telegram-bot-api's People

Contributors

demget avatar harshil21 avatar knorpelsenf avatar kunoisayami avatar levlam avatar mammad900 avatar serjan-nasredin 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  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

telegram-bot-api's Issues

Crash during build

OS: Ubuntu 18.04

Error:

[ 55%] Building CXX object td/CMakeFiles/tdcore.dir/td/telegram/ContactsManager.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-7/README.Bugs for instructions.
td/CMakeFiles/tdcore.dir/build.make:830: recipe for target 'td/CMakeFiles/tdcore.dir/td/telegram/ContactsManager.cpp.o' failed
make[2]: *** [td/CMakeFiles/tdcore.dir/td/telegram/ContactsManager.cpp.o] Error 4
CMakeFiles/Makefile2:323: recipe for target 'td/CMakeFiles/tdcore.dir/all' failed
make[1]: *** [td/CMakeFiles/tdcore.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

error: implicit instantiation of undefined template 'std::__1::hash<int>'

Trying to build on Ubuntu 16 with clang++ (using the instructions from https://tdlib.github.io/telegram-bot-api/build.html?os=Linux):

[ 58%] Building CXX object td/CMakeFiles/tdcore.dir/td/telegram/DialogAction.cpp.o
In file included from /root/telegram-bot-api/td/td/telegram/DialogAction.cpp:7:
In file included from /root/telegram-bot-api/td/td/telegram/DialogAction.h:9:
/root/telegram-bot-api/td/td/telegram/MessageContentType.h:75:12: error: implicit instantiation of undefined template 'std::__1::hash<int>'
    return std::hash<int32>()(static_cast<int32>(content_type));
           ^
/usr/include/c++/v1/memory:3150:29: note: template is declared here
template <class _Tp> struct hash;
                            ^
1 error generated.
td/CMakeFiles/tdcore.dir/build.make:974: recipe for target 'td/CMakeFiles/tdcore.dir/td/telegram/DialogAction.cpp.o' failed
make[2]: *** [td/CMakeFiles/tdcore.dir/td/telegram/DialogAction.cpp.o] Error 1
CMakeFiles/Makefile2:351: recipe for target 'td/CMakeFiles/tdcore.dir/all' failed
make[1]: *** [td/CMakeFiles/tdcore.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Probably related to a recent commit in tdlib/td repository.

Download files from not local mode

The file path is like documents/file_5, but I cant figure out how to download it. It doesn't work like the cloud API suggests, I am getting a 404 not found error then. Am I missing something?

No media_group_id in response

Hi, I have a problem with quickly dropping mediaGroup into a channel. Bot in linked chat gets media_group_id every other time. Will there be a fix for this?

[Feature Request] Add a method to delete multi messages

Hi
in tdlib there's a method for deleting multi messages with one request can you add that for api to delete multi messages with one api request?

sometimes in groups i want to delete last x messages and i should call deleteMessage x times

Cannot download file

Where are the files located?
I'm using a generic url:
https://hostlocal.api/file/bot<token>/path/file_id.ext
and
https://hostlocal.api/file/bot<token>/<file_path>?file_id=<file_id>
But the return always:

{
"ok": false,
"error_code": 404,
"description": "Not Found"
}

support for MTProto Proxies

Telegram is blocked in some countries like Iran and we need to use a VPN for telegram or bot development itself.

Now that we know this project is using tdlib internally, it must be easily possible to add mtproto proxy support to it. This has multiple advantages:

  1. no need to use VPN/remote ssh during the development
  2. being able to deploy a bot on a server located inside the country. This is mainly related to the costs because of the horrible economic situation we are in. This helps us to save a little on the servers.
    Another reason for this can be lower "website" ping when a website has a telegram bot but lower ping for that website is preferred
  3. improving the security in general. People who are paranoid about using a local api server can use a mtproto proxy to ensure their security

I am really desperate for this. You guys can never understand how hard it is for me to make a bot here....would really appreciate some help!

getFile returning error with large files

When I try to download a large file using getFile with a local telegram-bot-api server, often it hangs for 1 minute with no response, and then I get the following error:

{"ok":false,"error_code":400,"description":"Bad Request: wrong file_id or the file is temporarily unavailable"}

After retrying several times it eventually works.

This is how I'm running the server:

[Unit]
Description=Telegram Bot API
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/telegram-bot-api --local
WorkingDirectory=/opt/telegram-bot-api
Environment=TELEGRAM_API_ID=[REDACTED]
Environment=TELEGRAM_API_HASH=[REDACTED]
User=telegram
Group=telegram
Restart=on-failure
RestartSec=1m

[Install]
WantedBy=multi-user.target

Ability to switch from HTTP 1.1. to gRPC

Is there such an opportunity to rewrite the implementation of HTTP 1.1 to modern gRPC? Where the speed of information exchange is very fast. I have this implementation in JAVA, where I communicate with TDLib (Telegram Database library) over JNI. But native things from Telegram developers are more better and it will be better to inject and implement here some gRPC :-) Thank you!

How is this project related to telegram ?

I was just wondering how is this project related to telegram, how is it gonna obtain Telegram-Related-Data if we run it on our own server, and if it's gonna obtain data from telegram's own servers, then why not just use the telegram's own Bot API ?

And is it safe to use this ? I mean is it guaranteed that user's data would be safe ? Or it will be accessible as raw data on server-side ?

should it be dockerized?

Awesome!
If someone would be run bot-api on cloud native environment pull requests with Dockerfiles will be accepted or users must implement it on their side?

[Feature Request] WebSocket

Good day! I know that WebSocket not in your documentation. But I suggest to implement it.
I think that implementation of WebSocket will make connectivity between bots and mtproto better.

For example Discord messenger works on WebSocket for requesting data. And it can realize many features for big servers faster than it can be in longpoll (I'm not sure about webhook).

And don't forget that beautiful implementation of WebSocket is simpler for newbies, than webhook or long polling.

Debian 10 build error

Build by instructions, but got stuck two times (first install libc++abi-dev), second:

/telegram-bot-api/build# cmake --build . --target install
[  0%] Building C object td/sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o
cc: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
make[2]: *** [td/sqlite/CMakeFiles/tdsqlite.dir/build.make:63: td/sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1213: td/sqlite/CMakeFiles/tdsqlite.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

How would you edit a message with lots of entites ?

Let say i want to edit a message with bunch of entities (href, bold,...). So the first step is to useforwardMessage and get info about body of post, The problem is the api doesnt provide full text of the message with raw entites (<b>text</b>) so we have to build the message with offsets in the entities array, Is there any method that provides full and raw text and we could easily edit a message just like telegram clients ?

telegram-bot-api/ClientParameters.h:9:10: fatal error: td/actor/actor.h: No such file or directory

I was just building a Dockerfile on Alpine and encountered a build error:
Might have been renamed to tdactor in the linked repo?

[ 89%] Linking CXX static library libtdutils.a
[ 89%] Built target tdutils
Scanning dependencies of target telegram-bot-api
[ 90%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o
In file included from /root/telegram-bot-api/telegram-bot-api/Query.h:9,
                 from /root/telegram-bot-api/telegram-bot-api/Client.h:9,
                 from /root/telegram-bot-api/telegram-bot-api/ClientManager.h:9,
                 from /root/telegram-bot-api/telegram-bot-api/telegram-bot-api.cpp:7:
/root/telegram-bot-api/telegram-bot-api/ClientParameters.h:9:10: fatal error: td/actor/actor.h: No such file or directory
    9 | #include "td/actor/actor.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/telegram-bot-api.dir/build.make:83: CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:208: CMakeFiles/telegram-bot-api.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
Error: error building at STEP "RUN cd /root/ && git clone --recursive https://github.com/tdlib/telegram-bot-api.git && cd telegram-bot-api && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . --target install": error while running runtime: exit status 2

Dockerfile in progress:

FROM alpine
RUN apk add openssl zlib g++ gperf cmake make linux-headers git
RUN cd /root/ && git clone --recursive https://github.com/tdlib/telegram-bot-api.git && cd telegram-bot-api && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. &$
ENTRYPOINT /root/telegram-bot-api/build/telegram-bot-api

CMAKE build stucks

When following the installing instructions generator for Linux, Ubuntu 20 at running the command "cmake --build . --target install", this displays:
Scanning dependencies of target tdsqlite
[ 0%] Building C Object tg/sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o

And the program freezes

instance crashes when using getMe

Hello there.

Great thing we have here, if it would just work. I tried running it on my laptop, but it crashes when I do the "getMe" call. I can confirm it running before because the stats port I use works. I run it with filter set to 345017557/0, since my bots id is that and I only want it to connect. I also followed all the buildings instructions and logged my bot out before attempting to use the local instance.

I'm gonna attach the log to this issue, hope it helps or you can show me where my error is. It happens to run on an Ubuntu 20.04 flavour, if that is the issue, I will happily install plain Ubuntu itself.
log.log

Also, you can PM me on telegram, same username, if you want a more direct form of communication.

Compilation fails on OpenBSD

Hello! I tried compiling bot server on OpenBSD. I've done everything like described in build instructions.
Firstly I tried it on OpenBSD 6.8, but then I realized that official instruction points out that OpenBSD 6.7 should be used.
Then I tried on OpenBSD 6.7 and got the same error.
Compilation was performed from root user, so it's not the problem of memory access.
Here's my dmesg and error log (made with cmake --build . --target install 2> error.log).
Of course I suppose it could be an issue with VirtualBox, but it seems like there's something wrong in a different place.

ld: error: undefined symbol: td::Td::request(unsigned long long, td::tl::unique_ptr<td::td_api::Function>)
>>> referenced by ClientActor.cpp
>>>               ClientActor.cpp.o:(td::ClientActor::request(unsigned long long, td::tl::unique_ptr<td::td_api::Function>)) in archive td/libtdcore.a

ld: error: undefined symbol: td::Td::static_request(td::tl::unique_ptr<td::td_api::Function>)
>>> referenced by ClientActor.cpp
>>>               ClientActor.cpp.o:(td::ClientActor::execute(td::tl::unique_ptr<td::td_api::Function>)) in archive td/libtdcore.a

ld: error: undefined symbol: td::Td::Td(td::unique_ptr<td::TdCallback>, td::Td::Options)
>>> referenced by ClientActor.cpp
>>>               ClientActor.cpp.o:(td::ActorOwn<td::Td> td::Scheduler::create_actor<td::Td, td::unique_ptr<td::TdCallback>, td::Td::Options>(td::Slice, td::unique_ptr<td::TdCallback>&&, td::Td::Options&&)) in archive td/libtdcore.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in . (CMakeFiles/telegram-bot-api.dir/build.make:202 'telegram-bot-api': /usr/local/bin/cmake -E cmake_link_script CMakeFiles/te...)
*** Error 2 in . (CMakeFiles/Makefile2:379 'CMakeFiles/telegram-bot-api.dir/all': /usr/bin/make -f CMakeFiles/telegram-bot-api.dir/build.mak...)
*** Error 2 in /home/aaoth/telegram-bot-api/build (Makefile:130 'all': /usr/bin/make -f CMakeFiles/Makefile2 all)

dmesg.txt

Bot api server general questions

  1. Is it right that this is bot-api to client-api proxy for bots?
  2. Can we extend this server api with methods that exist in client api and can be called by bots but does not exist in bot api?

Publish docker image

It would be much easier to host Telegram Bot API server if it could be launched as a docker container.

Ideally, included with docker-compose example.

I am glad to help, but I don't have deep knowledge in C++ builds. Moreover, less knowledge in optimal C++ builds.
It would be awesome If you can at least point me to base image for building and base image for running.

How to get file upload progress?

With standard Bot API we know when we start uploading, can check that we are still uploading and finally know when upload ends

With TDLib and Telegram API according to this https://core.telegram.org/api/files we know part_size, count of parts and completely control upload process with upload.saveBigFilePart so we know current progress

With you solution we can handle upload progress like with Bot API, but, maybe you can provide some extra endpoint for upload progress or some explanation of how we can handle it?

I just want to know the state of uploading .

P.S.: sorry for bad english it is not my native language. hope you understand me (:

Build fails on Raspberry Pi 2 Model B

(I first wrote this in BotSupport but got no response there, but error still exists)
I'm trying to run Telegram Bot API on Raspberry Pi 2 model B, running Alpinelinux, but when I follow the build instructions for that, on
cmake --build . --target install
it hanged at around 50%.

But on tdlib there are build instructions to for lower-powered devices https://github.com/tdlib/td#building and I tried that on the pi, by cloning the tgbotapi and running

php SplitSource.php

in the td-directory before building

Logs when running SplitSource
tgapi0:~/telegram-bot-api/td$ php SplitSource.php
Processing file td/telegram/ContactsManager.cpp
Writing file td/telegram/ContactsManager0.cpp
Writing file td/telegram/ContactsManager1.cpp
Writing file td/telegram/ContactsManager2.cpp
Writing file td/telegram/ContactsManager3.cpp
Writing file td/telegram/ContactsManager4.cpp
Writing file td/telegram/ContactsManager5.cpp
Writing file td/telegram/ContactsManager6.cpp
Writing file td/telegram/ContactsManager7.cpp
Writing file td/telegram/ContactsManager8.cpp
Writing file td/telegram/ContactsManager9.cpp
Writing file td/telegram/ContactsManager10.cpp
Writing file td/telegram/ContactsManager11.cpp
Writing file td/telegram/ContactsManager12.cpp
Writing file td/telegram/ContactsManager13.cpp
Writing file td/telegram/ContactsManager14.cpp
Writing file td/telegram/ContactsManager15.cpp
Writing file td/telegram/ContactsManager16.cpp
Writing file td/telegram/ContactsManager17.cpp
Writing file td/telegram/ContactsManager18.cpp
Writing file td/telegram/ContactsManager19.cpp
Processing file td/telegram/MessagesManager.cpp
Writing file td/telegram/MessagesManager0.cpp
Writing file td/telegram/MessagesManager1.cpp
Writing file td/telegram/MessagesManager2.cpp
Writing file td/telegram/MessagesManager3.cpp
Writing file td/telegram/MessagesManager4.cpp
Writing file td/telegram/MessagesManager5.cpp
Writing file td/telegram/MessagesManager6.cpp
Writing file td/telegram/MessagesManager7.cpp
Writing file td/telegram/MessagesManager8.cpp
Writing file td/telegram/MessagesManager9.cpp
Writing file td/telegram/MessagesManager10.cpp
Writing file td/telegram/MessagesManager11.cpp
Writing file td/telegram/MessagesManager12.cpp
Writing file td/telegram/MessagesManager13.cpp
Writing file td/telegram/MessagesManager14.cpp
Writing file td/telegram/MessagesManager15.cpp
Writing file td/telegram/MessagesManager16.cpp
Writing file td/telegram/MessagesManager17.cpp
Writing file td/telegram/MessagesManager18.cpp
Writing file td/telegram/MessagesManager19.cpp
Writing file td/telegram/MessagesManager20.cpp
Writing file td/telegram/MessagesManager21.cpp
Writing file td/telegram/MessagesManager22.cpp
Writing file td/telegram/MessagesManager23.cpp
Writing file td/telegram/MessagesManager24.cpp
Writing file td/telegram/MessagesManager25.cpp
Writing file td/telegram/MessagesManager26.cpp
Writing file td/telegram/MessagesManager27.cpp
Writing file td/telegram/MessagesManager28.cpp
Writing file td/telegram/MessagesManager29.cpp
Writing file td/telegram/MessagesManager30.cpp
Writing file td/telegram/MessagesManager31.cpp
Writing file td/telegram/MessagesManager32.cpp
Writing file td/telegram/MessagesManager33.cpp
Writing file td/telegram/MessagesManager34.cpp
Writing file td/telegram/MessagesManager35.cpp
Writing file td/telegram/MessagesManager36.cpp
Writing file td/telegram/MessagesManager37.cpp
Writing file td/telegram/MessagesManager38.cpp
Writing file td/telegram/MessagesManager39.cpp
Writing file td/telegram/MessagesManager40.cpp
Writing file td/telegram/MessagesManager41.cpp
Writing file td/telegram/MessagesManager42.cpp
Writing file td/telegram/MessagesManager43.cpp
Writing file td/telegram/MessagesManager44.cpp
Writing file td/telegram/MessagesManager45.cpp
Writing file td/telegram/MessagesManager46.cpp
Writing file td/telegram/MessagesManager47.cpp
Writing file td/telegram/MessagesManager48.cpp
Writing file td/telegram/MessagesManager49.cpp
Processing file td/telegram/NotificationManager.cpp
Writing file td/telegram/NotificationManager0.cpp
Writing file td/telegram/NotificationManager1.cpp
Writing file td/telegram/NotificationManager2.cpp
Writing file td/telegram/NotificationManager3.cpp
Writing file td/telegram/NotificationManager4.cpp
Writing file td/telegram/NotificationManager5.cpp
Writing file td/telegram/NotificationManager6.cpp
Writing file td/telegram/NotificationManager7.cpp
Writing file td/telegram/NotificationManager8.cpp
Writing file td/telegram/NotificationManager9.cpp
Processing file td/telegram/StickersManager.cpp
Writing file td/telegram/StickersManager0.cpp
Writing file td/telegram/StickersManager1.cpp
Writing file td/telegram/StickersManager2.cpp
Writing file td/telegram/StickersManager3.cpp
Writing file td/telegram/StickersManager4.cpp
Writing file td/telegram/StickersManager5.cpp
Writing file td/telegram/StickersManager6.cpp
Writing file td/telegram/StickersManager7.cpp
Writing file td/telegram/StickersManager8.cpp
Writing file td/telegram/StickersManager9.cpp
Processing file td/telegram/Td.cpp
Writing file td/telegram/Td0.cpp
Writing file td/telegram/Td1.cpp
Writing file td/telegram/Td2.cpp
Writing file td/telegram/Td3.cpp
Writing file td/telegram/Td4.cpp
Writing file td/telegram/Td5.cpp
Writing file td/telegram/Td6.cpp
Writing file td/telegram/Td7.cpp
Writing file td/telegram/Td8.cpp
Writing file td/telegram/Td9.cpp
Writing file td/telegram/Td10.cpp
Writing file td/telegram/Td11.cpp
Writing file td/telegram/Td12.cpp
Writing file td/telegram/Td13.cpp
Writing file td/telegram/Td14.cpp
Writing file td/telegram/Td15.cpp
Writing file td/telegram/Td16.cpp
Writing file td/telegram/Td17.cpp
Writing file td/telegram/Td18.cpp
Writing file td/telegram/Td19.cpp
Writing file td/telegram/Td20.cpp
Writing file td/telegram/Td21.cpp
Writing file td/telegram/Td22.cpp
Writing file td/telegram/Td23.cpp
Writing file td/telegram/Td24.cpp
Writing file td/telegram/Td25.cpp
Writing file td/telegram/Td26.cpp
Writing file td/telegram/Td27.cpp
Writing file td/telegram/Td28.cpp
Writing file td/telegram/Td29.cpp
Writing file td/telegram/Td30.cpp
Writing file td/telegram/Td31.cpp
Writing file td/telegram/Td32.cpp
Writing file td/telegram/Td33.cpp
Writing file td/telegram/Td34.cpp
Writing file td/telegram/Td35.cpp
Writing file td/telegram/Td36.cpp
Writing file td/telegram/Td37.cpp
Writing file td/telegram/Td38.cpp
Writing file td/telegram/Td39.cpp
Writing file td/telegram/Td40.cpp
Writing file td/telegram/Td41.cpp
Writing file td/telegram/Td42.cpp
Writing file td/telegram/Td43.cpp
Writing file td/telegram/Td44.cpp
Writing file td/telegram/Td45.cpp
Writing file td/telegram/Td46.cpp
Writing file td/telegram/Td47.cpp
Writing file td/telegram/Td48.cpp
Writing file td/telegram/Td49.cpp
Processing file td/generate/auto/td/telegram/td_api.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/td_api.cpp
Processing file td/generate/auto/td/telegram/td_api_json.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/td_api_json.cpp
Processing file td/generate/auto/td/telegram/telegram_api.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/telegram_api.cpp
tgapi0:~/telegram-bot-api/td$

But I get this error message when running cmake build install again, ending with:

cmake build error after splitsource
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_cpp.cpp.o
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_h.cpp.o
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_td.cpp.o
[ 20%] Linking CXX executable generate_common
[ 20%] Built target generate_common
Scanning dependencies of target tl_generate_common
[ 20%] Generate common tl source files
Write tl to file auto/td/telegram/telegram_api.cpp
Write tl to file auto/td/telegram/telegram_api.h
Write tl to file auto/td/telegram/telegram_api.hpp
Write tl to file auto/td/telegram/secret_api.cpp
Write tl to file auto/td/telegram/secret_api.h
Write tl to file auto/td/telegram/secret_api.hpp
Write tl to file auto/td/mtproto/mtproto_api.cpp
Write tl to file auto/td/mtproto/mtproto_api.h
Write tl to file auto/td/mtproto/mtproto_api.hpp
Write tl to file auto/td/telegram/td_api.cpp
Write tl to file auto/td/telegram/td_api.h
Write tl to file auto/td/telegram/td_api.hpp
PHP Fatal error:  Uncaught Error: Call to undefined function ctype_upper() in /home/k/telegram-bot-api/td/td/generate/TlDocumentationGenerator.php:56
Stack trace:
#0 /home/k/telegram-bot-api/td/td/generate/TlDocumentationGenerator.php(237): TlDocumentationGenerator->addDot()
#1 /home/k/telegram-bot-api/td/td/generate/DoxygenTlDocumentationGenerator.php(428): TlDocumentationGenerator->generate()
#2 {main}
  thrown in /home/k/telegram-bot-api/td/td/generate/TlDocumentationGenerator.php on line 56
make[2]: *** [td/td/generate/CMakeFiles/tl_generate_common.dir/build.make:82: td/td/generate/CMakeFiles/tl_generate_common] Error 255
make[1]: *** [CMakeFiles/Makefile2:969: td/td/generate/CMakeFiles/tl_generate_common.dir/all] Error 2

I then installed php7-ctype and did the build process again but it ended with another error

Full logs with cmake build error and ctype installed
tgapi0:~$ rm -rf telegram-bot-api/
tgapi0:~$ git clone --recursive https://github.com/tdlib/telegram-bot-api.git
Cloning into 'telegram-bot-api'...
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 57 (delta 0), reused 1 (delta 0), pack-reused 55
Receiving objects: 100% (57/57), 106.36 KiB | 539.00 KiB/s, done.
Resolving deltas: 100% (21/21), done.
Submodule 'td' (https://github.com/tdlib/td.git) registered for path 'td'
Cloning into '/home/k/telegram-bot-api/td'...
remote: Enumerating objects: 155, done.        
remote: Counting objects: 100% (155/155), done.        
remote: Compressing objects: 100% (87/87), done.        
remote: Total 45552 (delta 69), reused 121 (delta 64), pack-reused 45397        
Receiving objects: 100% (45552/45552), 17.46 MiB | 1.91 MiB/s, done.
Resolving deltas: 100% (32449/32449), done.
Submodule path 'td': checked out 'b21d667bdfb13df15f249896155f98f175a89657'
tgapi0:~$ cd telegram-bot-api/td/
tgapi0:~/telegram-bot-api/td$ php SplitSource.php
Processing file td/telegram/ContactsManager.cpp
Writing file td/telegram/ContactsManager0.cpp
Writing file td/telegram/ContactsManager1.cpp
Writing file td/telegram/ContactsManager2.cpp
Writing file td/telegram/ContactsManager3.cpp
Writing file td/telegram/ContactsManager4.cpp
Writing file td/telegram/ContactsManager5.cpp
Writing file td/telegram/ContactsManager6.cpp
Writing file td/telegram/ContactsManager7.cpp
Writing file td/telegram/ContactsManager8.cpp
Writing file td/telegram/ContactsManager9.cpp
Writing file td/telegram/ContactsManager10.cpp
Writing file td/telegram/ContactsManager11.cpp
Writing file td/telegram/ContactsManager12.cpp
Writing file td/telegram/ContactsManager13.cpp
Writing file td/telegram/ContactsManager14.cpp
Writing file td/telegram/ContactsManager15.cpp
Writing file td/telegram/ContactsManager16.cpp
Writing file td/telegram/ContactsManager17.cpp
Writing file td/telegram/ContactsManager18.cpp
Writing file td/telegram/ContactsManager19.cpp
Processing file td/telegram/MessagesManager.cpp
Writing file td/telegram/MessagesManager0.cpp
Writing file td/telegram/MessagesManager1.cpp
Writing file td/telegram/MessagesManager2.cpp
Writing file td/telegram/MessagesManager3.cpp
Writing file td/telegram/MessagesManager4.cpp
Writing file td/telegram/MessagesManager5.cpp
Writing file td/telegram/MessagesManager6.cpp
Writing file td/telegram/MessagesManager7.cpp
Writing file td/telegram/MessagesManager8.cpp
Writing file td/telegram/MessagesManager9.cpp
Writing file td/telegram/MessagesManager10.cpp
Writing file td/telegram/MessagesManager11.cpp
Writing file td/telegram/MessagesManager12.cpp
Writing file td/telegram/MessagesManager13.cpp
Writing file td/telegram/MessagesManager14.cpp
Writing file td/telegram/MessagesManager15.cpp
Writing file td/telegram/MessagesManager16.cpp
Writing file td/telegram/MessagesManager17.cpp
Writing file td/telegram/MessagesManager18.cpp
Writing file td/telegram/MessagesManager19.cpp
Writing file td/telegram/MessagesManager20.cpp
Writing file td/telegram/MessagesManager21.cpp
Writing file td/telegram/MessagesManager22.cpp
Writing file td/telegram/MessagesManager23.cpp
Writing file td/telegram/MessagesManager24.cpp
Writing file td/telegram/MessagesManager25.cpp
Writing file td/telegram/MessagesManager26.cpp
Writing file td/telegram/MessagesManager27.cpp
Writing file td/telegram/MessagesManager28.cpp
Writing file td/telegram/MessagesManager29.cpp
Writing file td/telegram/MessagesManager30.cpp
Writing file td/telegram/MessagesManager31.cpp
Writing file td/telegram/MessagesManager32.cpp
Writing file td/telegram/MessagesManager33.cpp
Writing file td/telegram/MessagesManager34.cpp
Writing file td/telegram/MessagesManager35.cpp
Writing file td/telegram/MessagesManager36.cpp
Writing file td/telegram/MessagesManager37.cpp
Writing file td/telegram/MessagesManager38.cpp
Writing file td/telegram/MessagesManager39.cpp
Writing file td/telegram/MessagesManager40.cpp
Writing file td/telegram/MessagesManager41.cpp
Writing file td/telegram/MessagesManager42.cpp
Writing file td/telegram/MessagesManager43.cpp
Writing file td/telegram/MessagesManager44.cpp
Writing file td/telegram/MessagesManager45.cpp
Writing file td/telegram/MessagesManager46.cpp
Writing file td/telegram/MessagesManager47.cpp
Writing file td/telegram/MessagesManager48.cpp
Writing file td/telegram/MessagesManager49.cpp
Processing file td/telegram/NotificationManager.cpp
Writing file td/telegram/NotificationManager0.cpp
Writing file td/telegram/NotificationManager1.cpp
Writing file td/telegram/NotificationManager2.cpp
Writing file td/telegram/NotificationManager3.cpp
Writing file td/telegram/NotificationManager4.cpp
Writing file td/telegram/NotificationManager5.cpp
Writing file td/telegram/NotificationManager6.cpp
Writing file td/telegram/NotificationManager7.cpp
Writing file td/telegram/NotificationManager8.cpp
Writing file td/telegram/NotificationManager9.cpp
Processing file td/telegram/StickersManager.cpp
Writing file td/telegram/StickersManager0.cpp
Writing file td/telegram/StickersManager1.cpp
Writing file td/telegram/StickersManager2.cpp
Writing file td/telegram/StickersManager3.cpp
Writing file td/telegram/StickersManager4.cpp
Writing file td/telegram/StickersManager5.cpp
Writing file td/telegram/StickersManager6.cpp
Writing file td/telegram/StickersManager7.cpp
Writing file td/telegram/StickersManager8.cpp
Writing file td/telegram/StickersManager9.cpp
Processing file td/telegram/Td.cpp
Writing file td/telegram/Td0.cpp
Writing file td/telegram/Td1.cpp
Writing file td/telegram/Td2.cpp
Writing file td/telegram/Td3.cpp
Writing file td/telegram/Td4.cpp
Writing file td/telegram/Td5.cpp
Writing file td/telegram/Td6.cpp
Writing file td/telegram/Td7.cpp
Writing file td/telegram/Td8.cpp
Writing file td/telegram/Td9.cpp
Writing file td/telegram/Td10.cpp
Writing file td/telegram/Td11.cpp
Writing file td/telegram/Td12.cpp
Writing file td/telegram/Td13.cpp
Writing file td/telegram/Td14.cpp
Writing file td/telegram/Td15.cpp
Writing file td/telegram/Td16.cpp
Writing file td/telegram/Td17.cpp
Writing file td/telegram/Td18.cpp
Writing file td/telegram/Td19.cpp
Writing file td/telegram/Td20.cpp
Writing file td/telegram/Td21.cpp
Writing file td/telegram/Td22.cpp
Writing file td/telegram/Td23.cpp
Writing file td/telegram/Td24.cpp
Writing file td/telegram/Td25.cpp
Writing file td/telegram/Td26.cpp
Writing file td/telegram/Td27.cpp
Writing file td/telegram/Td28.cpp
Writing file td/telegram/Td29.cpp
Writing file td/telegram/Td30.cpp
Writing file td/telegram/Td31.cpp
Writing file td/telegram/Td32.cpp
Writing file td/telegram/Td33.cpp
Writing file td/telegram/Td34.cpp
Writing file td/telegram/Td35.cpp
Writing file td/telegram/Td36.cpp
Writing file td/telegram/Td37.cpp
Writing file td/telegram/Td38.cpp
Writing file td/telegram/Td39.cpp
Writing file td/telegram/Td40.cpp
Writing file td/telegram/Td41.cpp
Writing file td/telegram/Td42.cpp
Writing file td/telegram/Td43.cpp
Writing file td/telegram/Td44.cpp
Writing file td/telegram/Td45.cpp
Writing file td/telegram/Td46.cpp
Writing file td/telegram/Td47.cpp
Writing file td/telegram/Td48.cpp
Writing file td/telegram/Td49.cpp
Processing file td/generate/auto/td/telegram/td_api.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/td_api.cpp
Processing file td/generate/auto/td/telegram/td_api_json.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/td_api_json.cpp
Processing file td/generate/auto/td/telegram/telegram_api.cpp
ERROR: skip unexisting file td/generate/auto/td/telegram/telegram_api.cpp
tgapi0:~/telegram-bot-api/td$ cd ..
tgapi0:~/telegram-bot-api$ mkdir build
tgapi0:~/telegram-bot-api$ cd build/
tgapi0:~/telegram-bot-api/build$ export CXXFLAGS=""
tgapi0:~/telegram-bot-api/build$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. ..
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find ccache (this is NOT an error)
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1h")  
-- Found OpenSSL: /usr/include /usr/lib/libssl.so;/usr/lib/libcrypto.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_STD14
-- Performing Test HAVE_STD14 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2
-- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2 - Success
-- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH
-- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_FLAG_WCAST_QUAL
-- Performing Test HAVE_CXX_FLAG_WCAST_QUAL - Success
-- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE
-- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE - Success
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES - Success
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND - Success
-- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO
-- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO - Success
-- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP
-- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP - Success
-- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE
-- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE - Success
-- Performing Test HAVE_CXX_FLAG_WVLA
-- Performing Test HAVE_CXX_FLAG_WVLA - Success
-- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER
-- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_FLAG_WCONVERSION
-- Performing Test HAVE_CXX_FLAG_WCONVERSION - Success
-- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION
-- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION - Success
-- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC - Failed
-- Performing Test HAVE_CXX_FLAG_WDEPRECATED
-- Performing Test HAVE_CXX_FLAG_WDEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WUNUSED_COMMAND_LINE_ARGUMENT
-- Performing Test HAVE_CXX_FLAG_WUNUSED_COMMAND_LINE_ARGUMENT - Failed
-- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS
-- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS - Failed
-- Performing Test HAVE_CXX_FLAG_WODR
-- Performing Test HAVE_CXX_FLAG_WODR - Success
-- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING
-- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING - Success
-- Performing Test HAVE_CXX_FLAG_WMAYBE_UNINITIALIZED
-- Performing Test HAVE_CXX_FLAG_WMAYBE_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_FLAG_WREDUNDANT_MOVE
-- Performing Test HAVE_CXX_FLAG_WREDUNDANT_MOVE - Success
-- Found ZLIB: /lib/libz.so (found version "1.2.11") 
-- Found ZLIB: /usr/include /lib/libz.so
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Could NOT find Readline (missing: READLINE_INCLUDE_DIR READLINE_LIBRARY) 
-- Could NOT find Readline (this is NOT an error)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k/telegram-bot-api/build
tgapi0:~/telegram-bot-api/build$ cmake --build . --target install
Scanning dependencies of target generate_mime_types_gperf
[  0%] Building CXX object td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o
[  0%] Linking CXX executable generate_mime_types_gperf
[  0%] Built target generate_mime_types_gperf
Scanning dependencies of target tdmime_auto
[  0%] Generating ../../../../td/tdutils/generate/auto/mime_type_to_extension.gperf, ../../../../td/tdutils/generate/auto/extension_to_mime_type.gperf
Extension "wmz" matches more than one type
Extension "sub" matches more than one type
[  0%] Generating ../../../../td/tdutils/generate/auto/mime_type_to_extension.cpp
[  1%] Generating ../../../../td/tdutils/generate/auto/extension_to_mime_type.cpp
[  1%] Built target tdmime_auto
Scanning dependencies of target tdutils
[  1%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/Clocks.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/FileFd.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/IPAddress.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/MemoryMapping.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/path.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/PollFlags.cpp.o
[  2%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/rlimit.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/ServerSocketFd.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/signals.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/sleep.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/SocketFd.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/stacktrace.cpp.o
[  4%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/Stat.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/StdStreams.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/thread_local.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/UdpSocketFd.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/uname.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/user.cpp.o
[  5%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/wstring_convert.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/Epoll.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/EventFdBsd.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/EventFdLinux.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/EventFdWindows.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/Iocp.cpp.o
[  6%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/KQueue.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/NativeFd.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/Poll.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/Select.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/ThreadIdGuard.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/ThreadPthread.cpp.o
[  8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/detail/WineventPoll.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/generate/auto/mime_type_to_extension.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/generate/auto/extension_to_mime_type.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/base64.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/BigNum.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/buffer.cpp.o
[  9%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/BufferedUdp.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/check.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/crypto.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/ExitGuard.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/FileLog.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/filesystem.cpp.o
[ 11%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/find_boundary.cpp.o
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Gzip.cpp.o
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/GzipByteFlow.cpp.o
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Hints.cpp.o
In file included from /usr/include/c++/10.2.0/bits/stl_algo.h:61,
                 from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_heap.h: In function 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Distance = int; _Tp = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/10.2.0/bits/stl_heap.h:223:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
  223 |     __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
      |     ^~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1839 |     __insertion_sort(_RandomAccessIterator __first,
      |     ^~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/10.2.0/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1945 |     __introsort_loop(_RandomAccessIterator __first,
      |     ^~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h:1959:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1959 |    std::__introsort_loop(__cut, __last, __depth_limit, __comp);
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h: In member function 'td::vector<long long int> td::Hints::search_word(const string&) const':
/usr/include/c++/10.2.0/bits/stl_algo.h:1974:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1974 |    std::__introsort_loop(__first, __last,
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 1975 |     std::__lg(__last - __first) * 2,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1976 |     __comp);
      |     ~~~~~~~              
/usr/include/c++/10.2.0/bits/stl_algo.h:1886:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1886 |    std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1891:23: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1891 |  std::__insertion_sort(__first, __last, __comp);
      |  ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/vector:72,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/common.h:59,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.h:9,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:7:
/usr/include/c++/10.2.0/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long int&}; _Tp = long long int; _Alloc = std::allocator<long long int>]':
/usr/include/c++/10.2.0/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector<long long int, std::allocator<long long int> >::iterator' changed in GCC 7.1
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/unordered_map:46,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.h:13,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:7:
/usr/include/c++/10.2.0/bits/hashtable.h: In member function 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::iterator std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::erase(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::const_iterator) [with _Key = long long int; _Value = std::pair<const long long int, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const long long int, std::__cxx11::basic_string<char> > >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<long long int>; _H1 = std::hash<long long int>; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<false, false, true>]':
/usr/include/c++/10.2.0/bits/hashtable.h:1851:5: note: parameter passing for argument of type 'std::_Hashtable<long long int, std::pair<const long long int, std::__cxx11::basic_string<char> >, std::allocator<std::pair<const long long int, std::__cxx11::basic_string<char> > >, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::const_iterator' {aka 'std::__detail::_Hashtable_base<long long int, std::pair<const long long int, std::__cxx11::basic_string<char> >, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::const_iterator'} changed in GCC 7.1
 1851 |     _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1852 |         _H1, _H2, _Hash, _RehashPolicy, _Traits>::
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/vector:67,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/common.h:59,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.h:9,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:7:
/usr/include/c++/10.2.0/bits/stl_vector.h: In static member function 'static void td::Hints::add_word(const string&, td::Hints::KeyT, std::map<std::__cxx11::basic_string<char>, std::vector<long long int, std::allocator<long long int> > >&)':
/usr/include/c++/10.2.0/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/unordered_map:46,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.h:13,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:7:
/usr/include/c++/10.2.0/bits/hashtable.h: In member function 'void td::Hints::add(td::Hints::KeyT, td::Slice)':
/usr/include/c++/10.2.0/bits/hashtable.h:807:21: note: parameter passing for argument of type 'std::_Hashtable<long long int, std::pair<const long long int, std::__cxx11::basic_string<char> >, std::allocator<std::pair<const long long int, std::__cxx11::basic_string<char> > >, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::const_iterator' {aka 'std::__detail::_Hashtable_base<long long int, std::pair<const long long int, std::__cxx11::basic_string<char> >, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::const_iterator'} changed in GCC 7.1
  807 |       { return erase(const_iterator(__it)); }
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<td::Hints::CompareByRating>]':
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1839 |     __insertion_sort(_RandomAccessIterator __first,
      |     ^~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
In file included from /usr/include/c++/10.2.0/bits/stl_algo.h:61,
                 from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_heap.h: In function 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Distance = int; _Tp = long long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<td::Hints::CompareByRating>]':
/usr/include/c++/10.2.0/bits/stl_heap.h:223:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
  223 |     __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
      |     ^~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<td::Hints::CompareByRating>]':
/usr/include/c++/10.2.0/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1945 |     __introsort_loop(_RandomAccessIterator __first,
      |     ^~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
/usr/include/c++/10.2.0/bits/stl_algo.h:1959:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1959 |    std::__introsort_loop(__cut, __last, __depth_limit, __comp);
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/vector:67,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/common.h:59,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.h:9,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:7:
/usr/include/c++/10.2.0/bits/stl_vector.h: In member function 'std::pair<unsigned int, std::vector<long long int, std::allocator<long long int> > > td::Hints::search(td::Slice, td::int32, bool) const':
/usr/include/c++/10.2.0/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/10.2.0/algorithm:62,
                 from /home/k/telegram-bot-api/td/tdutils/td/utils/Hints.cpp:16:
/usr/include/c++/10.2.0/bits/stl_algo.h:1974:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1974 |    std::__introsort_loop(__first, __last,
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 1975 |     std::__lg(__last - __first) * 2,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1976 |     __comp);
      |     ~~~~~~~              
/usr/include/c++/10.2.0/bits/stl_algo.h:1886:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1886 |    std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
      |    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/bits/stl_algo.h:1891:23: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >' changed in GCC 7.1
 1891 |  std::__insertion_sort(__first, __last, __comp);
      |  ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/HttpUrl.cpp.o
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/JsonBuilder.cpp.o
[ 12%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/logging.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/misc.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/MpmcQueue.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/OptionParser.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/PathView.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Random.cpp.o
[ 13%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/SharedSlice.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Slice.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/StackAllocator.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Status.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/StringBuilder.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/tests.cpp.o
[ 15%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Time.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/Timer.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/TsFileLog.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/tl_parsers.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/translit.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/unicode.cpp.o
[ 16%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/utf8.cpp.o
[ 18%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/MimeType.cpp.o
[ 18%] Linking CXX static library libtdutils.a
[ 18%] Built target tdutils
Scanning dependencies of target tdtl
[ 18%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_config.cpp.o
[ 18%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_core.cpp.o
[ 18%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_file_outputer.cpp.o
[ 18%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_file_utils.cpp.o
[ 19%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_generate.cpp.o
[ 19%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_outputer.cpp.o
[ 19%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_string_outputer.cpp.o
[ 19%] Building CXX object td/tdtl/CMakeFiles/tdtl.dir/td/tl/tl_writer.cpp.o
[ 19%] Linking CXX static library libtdtl.a
[ 19%] Built target tdtl
Scanning dependencies of target generate_common
[ 19%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/generate_common.cpp.o
[ 19%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_cpp.cpp.o
[ 19%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_h.cpp.o
[ 19%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_hpp.cpp.o
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_cpp.cpp.o
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_h.cpp.o
[ 20%] Building CXX object td/td/generate/CMakeFiles/generate_common.dir/tl_writer_td.cpp.o
[ 20%] Linking CXX executable generate_common
[ 20%] Built target generate_common
Scanning dependencies of target tl_generate_common
[ 20%] Generate common tl source files
Write tl to file auto/td/telegram/telegram_api.cpp
Write tl to file auto/td/telegram/telegram_api.h
Write tl to file auto/td/telegram/telegram_api.hpp
Write tl to file auto/td/telegram/secret_api.cpp
Write tl to file auto/td/telegram/secret_api.h
Write tl to file auto/td/telegram/secret_api.hpp
Write tl to file auto/td/mtproto/mtproto_api.cpp
Write tl to file auto/td/mtproto/mtproto_api.h
Write tl to file auto/td/mtproto/mtproto_api.hpp
Write tl to file auto/td/telegram/td_api.cpp
Write tl to file auto/td/telegram/td_api.h
Write tl to file auto/td/telegram/td_api.hpp
[ 20%] Built target tl_generate_common
Scanning dependencies of target tdapi
make[2]: *** No rule to make target '../td/td/generate/auto/td/telegram/td_api0.cpp', needed by 'td/CMakeFiles/tdapi.dir/td/generate/auto/td/telegram/td_api0.cpp.o'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:518: td/CMakeFiles/tdapi.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Could building for tgbotapi be supported on lower-powered devices as well?

Can't upload files > 20MB on Self Host

Behaviors

Expected behavior: Being able to upload files < 2000MB if telegram-bot-api is running in local mode
Actual behavior: {"ok":false,"error_code":400,"description":"Bad Request: failed to get HTTP URL content"}

What I've tried

  • Using both HTTP and HTTPS
  • URI Scheme: file://path/to/file.jpg with both absolute and relative path, hitting {"ok":false,"error_code":400,"description":"Bad Request: realpath failed for <path to file>"}
  • Asking on @bottalk, where the above option was suggested but also they (an Admin) couldn't get it to work on his system

Notes

--local flag is correctly enabled
Upload works for all files < 20 MB

API schema

Will someday we have API schema like OpenAPI or custom JSON Schema?

getFile method fails to generate a valid url

For some weird reason my bot stopped working after couple of tries.
Base on API documentation for getfile I should get a valid url for at least one hour for any file below 20mb and I don't see any more limitation on this method.
However I'm getting 404 response after the second try for each file format.

This issue started happening after couple of hours of testing my bot.
At the beginning I was just testing my bot with animation files ( GIFs ) and after 1-2 hours of testing which I've downloaded ~20 files it stopped working.
After that I tried with a photo and it worked for the first file and failed for further attempts.
Same thing happened to audio and video files, so after the first successful attempt it started giving 404.

I tried following solutions:

  • Using both http (http://api.telegram.org/file/bot<token>/<file_path>) and https (https://api.telegram.org/file/bot<token>/<file_path>)
  • Revoking my token and tried with a new token.
  • Creating a new bot and using its token
  • Rebooting my modem to get a new public IP ( in case it was somehow blacklisted/limited )
  • Using another device on a different network

But none of these changed anything.

Any idea what could be the reason ?

Excluding some bad users to not hit the bot api ?

I have bunch of spammers in my bot, I wont response to them, but they hit my api url anyway, So it would be nice if we could to tell telegram dont send updates from x user_id to my endpoint Or is there any solution for that ?

Ubuntu 20.10 use to build clang++ (recommended)

after cmake --build . --target install
gmake[1]: вход в каталог «/home/user/telegram-bot-api/build»
gmake[2]: вход в каталог «/home/user/telegram-bot-api/build»
Scanning dependencies of target tdsqlite
gmake[2]: выход из каталога «/home/user/telegram-bot-api/build»
gmake[2]: вход в каталог «/home/user/telegram-bot-api/build»
[ 0%] Building C object td/sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o
[ 0%] Linking C static library libtdsqlite.a
gmake[2]: выход из каталога «/home/user/telegram-bot-api/build»
[ 0%] Built target tdsqlite
gmake[2]: вход в каталог «/home/user/telegram-bot-api/build»
Scanning dependencies of target generate_mime_types_gperf
gmake[2]: выход из каталога «/home/user/telegram-bot-api/build»
gmake[2]: вход в каталог «/home/user/telegram-bot-api/build»
[ 0%] Building CXX object td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o
/home/user/telegram-bot-api/td/tdutils/generate/generate_mime_types_gperf.cpp:7:10: fatal error: 'algorithm' file not found
#include
^~~~~~~~~~~
1 error generated.
gmake[2]: *** [td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/build.make:63: td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o] Ошибка 1
gmake[2]: выход из каталога «/home/user/telegram-bot-api/build»
gmake[1]: *** [CMakeFiles/Makefile2:814: td/tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/all] Ошибка 2
gmake[1]: выход из каталога «/home/user/telegram-bot-api/build»
gmake: *** [Makefile:130: all] Ошибка 2

[Question] Can i move an active bot with many users to local?

Hi
i have a bot with thousand users i want to move it from telegram api to local api

Can i do it without losing data?

In case of moving from one local to another local you said we should also move bot directory to newer server but how about telegram severs to local? is there is a way to download my bot data from telegram servers?

ForceReply feature's logic needs update

When user has multiple devices, and the bot sends him message with ForceReply - reply interface is replicated on each device. This is understandable and perfectly ok, because user can respond on any device.
BUT when user responds to the message on one device, reply interface is cleared ONLY on this device. It is STILL ATTACHED to other devices.
User then should manually clear reply interface on each his device, which is really annoying.
Please fix that. Add option either to auto-remove ForceReply from the message (on all devices) after the first user's answer, or to edit the message and remove it manually (you already have this option to remove inline keyboard, but it doesn't work with ForceReply).

getUpdates: Concurrent short polling drops updates and 100 limit is too low

Yesterday we have issue with long polling. The requests to get updates took a couple of seconds, instead of a fraction of a second. Meanwhile users was sending updates to bot with rate higher than 100 updates per second. So updates were getting accumulated in Telegram server. I guess it was on your side or something global in AWS, because we have issue in 2 servers.

I was thinking of a workaround for situation like this. My idea was to detect such congestions by counting the number of updates received by getUpdates(timeout: 10). If the count is 100, it means updates are overflowing, so I can fall back into sending multiple concurrent short polling, e.g. getUpdates(timeout: 0, offset: nextOffset), getUpdates(timeout: 0, offset: nextOffset + 100). However, it didn't work well in my tests because Telegram occasionally droped some of updates, probably when the second request get handled by Telegram before the first one.

So my plan doesn't work unless you can relax some of the limitations.
One option is to increase the limit of offset, maybe from 100 to 1000. It seems that you drop old updates anyway, so why not?

Undelivered messages

When a user sends a message to a group in //@senders_username some text format, it will not be delivered to the bot

image

Internal Telegram bot API tokens

As I understand this service is working like a proxy between a bot clients and MProto, so their Telegram bot API tokens transferred directly to a Telegram servers.
Is there any way we can make own local database of custom bot API tokens that can be used by a local bots, but work under specified public Telegram bot API token?
This way real public Telegram bot API token will not be stored on a local bot service side, but only in the telegram-bot-api service storage.
Also we could set some local rights for internal api tokens, to restrict them for some actions or channels/groups.

InlineQuery with same offset sometimes arrives twice (from Android client)

This bug can be reproduced using Cloud Telegram API and Android client.

Steps to reproduce:

  1. Create a bot with enabled inline queries in BotFather
  2. Download this bot, get familiar with its sources and put bot's token into source. This bot is actually quite straightforward (and useless :)): it "persists" stickers which are arriving into private messages (into STICKERS list) and returns "peristed" stickers (20 at once) in response to any inline query. The bot uses Python 3.9 and does not use any additional libraries except requests.
  3. Now let's run it and save some stickers. Let's send any 23 stickers to bot's private messages:
    persist
    (here you can see last 4 stickers sent)
  4. Then do any inline query (using Android client) and scroll the sticker list to the bottom
    read
    Actually you already can see that last three stickers appeared twice. It you cannot see it, try to update a query and scroll down again. With a few attempts you will probably able to reproduce it.
    You can see that there are two requests with different ids but with the same offset (20):
    >>>>>
    received offset:  query id: 142374340692861376
    sending answer with next_offset: 20
    <<<<<
    >>>>>
    received offset: 20 query id: 142374341291894395
    sending answer with next_offset: None
    <<<<<
    >>>>>
    received offset: 20 query id: 142374339207531079
    sending answer with next_offset: None
    <<<<<
    

The bot seem quite straightforward, so I don't think there is a bug there (actually I implemented it from scratch just to reproduce a bug on another more complex bot). I am not sure though: is it a bug in API or in Android client.

Expose MTProto Methods, which are used by Bot API anyway

Hi there!

This issue is basically a follow up on a few comments from #1 (here, here, here), but as that's closed and discusses a lot of other topics, I'm opening a new issue.

What I understand from above comments: MTProto exposes some methods to Bots, while not directly exposing them through the Bot API, because the Bot API uses them internally. Not all of what MTProto provides via those methods is useful for bots.

My question would be, if it would be possible to fully expose those methods through the Bot API or at least reevaluate which of those can be useful for bots. Specifically, in the usergroup of python-telegram-bot, we get many questions on how to access a message by chat- and message_id. This is currently not possible through the Bot API, while getMessages is accessible by bots.

If I'm getting this all wrong, please correct me. Otherwise I'd be happy for a short response or - ideally - a future extension of Bot API.

Cheers!
A happy Bot API user :)

[Error : 0 : Option "api_id" is unrecognized]

Sorry for very stupid question
how to run?
I try next command from terminal:
./telegram-bot-api --api_id=123456 --api-hash=dabcdegzlol232346773b1d9e2
(with right params)
and got:

./telegram-bot-api: [Error : 0 : Option "api_id" is unrecognized]
Usage: telegram-bot-api --api_id=<arg> --api-hash=<arg> [--local] [OPTION]...

fatal error: td/actor/actor.h: No such file or directory

Hi
I try to build and get this error

[ 90%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o
In file included from /home/sega/telegram-bot-api/telegram-bot-api/Query.h:9,
                 from /home/sega/telegram-bot-api/telegram-bot-api/Client.h:9,
                 from /home/sega/telegram-bot-api/telegram-bot-api/ClientManager.h:9,
                 from /home/sega/telegram-bot-api/telegram-bot-api/telegram-bot-api.cpp:7:
/home/sega/telegram-bot-api/telegram-bot-api/ClientParameters.h:9:10: fatal error: td/actor/actor.h: No such file or directory
 #include "td/actor/actor.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/telegram-bot-api.dir/build.make:63: CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/telegram-bot-api.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

what can I do?

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.