4

我正在努力了解基础知识,并寻找寻求帮助的地方。我知道根据堆栈溢出标准,前两个问题有点模糊。

  • 是否有论坛/频道可以与尝试使用 MTProto 的人进行对话?
  • https://github.com/zerobias/telegram-mtproto是JS 中最容易使用的 MTProto 实现吗?
  • 它可以在 web 客户端中使用(即import在 webpack 环境中使用和 ES6)吗?

我看到一堆错误,但其中一些似乎与使用 webpack 4 有关,但我不确定我想要做的事情是否可能(请参阅Accessing Telegram API via web-based client),虽然我有现在设法获得发送的 2FA 代码

我的目标是创建一个客户端,该客户端可以登录某些电报频道,其中所有内容都来自机器人,并从中解析信息

4

1 回答 1

0

Connecting to the Telegram MTProto API is possible in browsers. You should use a library to do that. I'm going to mention some functional and maintained libraries.

There is the official TDLib with browser support, but it is quite hard for newcomers to use.

There is also GramJS which works on both Node.js and browsers, has type declarations for TypeScript and an easy-to-use API. It also take cares of many things like caching entities, so you do your work even faster. You can even change the lib target to use as an ES module in the browser.

is there a forum/channel somewhere for a dialog with people trying to use MTProto?

You can consider joining @gramjschat.

于 2022-03-03T15:41:45.243 回答