[英]tdlib-ruby Telegram API returns Error timed out
I was trying to set up a web client for telegram using ruby.我试图使用 ruby 为电报设置 web 客户端。 I registered for telegram application and obtained api_id and api_hash keys.
我注册了电报应用程序并获得了api_id和api_hash密钥。 Then I am using tdlib with the help of https://github.com/southbridgeio/tdlib-ruby .
然后我在https://github.com/southbridgeio/tdlib-ruby的帮助下使用 tdlib。 Each method call returns promise object and when checked for reason, shows -
<TD::Types::Error code=0 message="Timeout error">
.每个方法调用都返回 promise object 并在检查原因时显示 -
<TD::Types::Error code=0 message="Timeout error">
。 I'm not sure what is wrong.我不确定出了什么问题。 Any help would be appreciated.
任何帮助,将不胜感激。
Had similar problem.有类似的问题。 You need to connect first.
您需要先连接。 For example:
例如:
client = TD::Client.new
client.connect.then do
client.join_chat(chat_id)
end
Or或者
client = TD::Client.new
client.connect.wait
client.join_chat(chat_id).wait
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.