电报博特API错误codeS(综合组和频道) [英] Telegram Bot API errors codes (integrating Groups and Channels)
问题描述
我的工作我的开源项目 BOTServer 一个的 http://telegram.org 机器人平台网络挂接服务器,为Ruby开发者。
I'm working on my open-source project BOTServer a http://telegram.org Bot Platform Webhooks Server, for Rubyists.
我发送消息时经历了奇怪的错误(的sendMessage
API端点)在我创建了一个电报机器人。将消息发送到我创建了一个特定的机器人的时候,我得到了这些错误:
I experienced strange error when sending messages (sendMessage
API endpoint) on a Telegram Bot I created. when sending messages to a specific Bot I created, I got these errors:
-
错误code 400 - > 坏请求:组停用
电报::博特::例外:: ResponseError - 电报API返回的错误。 (OK:假,错误_ code:400,说明:[错误]:坏请求:组停用)
和/或
错误code 403 - > 博特是从聊天踢
Error code 403 -> Bot was kicked from a chat
电报::博特::例外:: ResponseError - 电报API返回的错误。 (OK:假,错误_ code:403,说明:[错误]:机器人是从聊天踢)
这真的很奇怪。
看来,这个问题是关系到一个特定的博特故事(错误是不够系统,我没有与其他机器人的问题)。在事实我做下列步骤操作:
That's really strange. It seems that the problem is related to the "story" of a specific Bot (errors are not systematic and I do not have issues with another bot). In facts I done these steps:
- 创建机器人(CAL让它:MYbot)
- 我加入了机器人来电报集团(例如MYGROUP)
- 我删除本集团 机器人
- 我发在回复机器人的消息给用户(然后我得到了错误)
问题1
好吧我是pretty肯定发生了什么错误电报即成一边,我可以删除和重建僵尸...关于解决任何更好的主意?
Question 1 Ok I'm pretty sure something wrong happened Telegram Serve side and I could delete and rebuild the bot... Any better idea about a solution ?
问题2
有电报博特错误的公布名单?我没有电报博特文档/教程找到。
Question 2 There is a published list of Telegram Bot errors ? I didn't find in Telegram Bot documentation/tutorials.
我爱电报架构!但我觉得有与搜索引擎的API一些问题/臭虫特别是近可能性插入组和Cahnnel机器人。任何类似的经验?
I love Telegram architecture! But I feel there are some issue/bugs with Bots APIs especially in recent possibilities to insert Bots in Groups and Cahnnel. Any similar experience ?
推荐答案
我回答自己已经找到了问题的一个可能的原因。出现问题只是我过去创造了一个单一的特定漫游(我从组中删除)。由于specificed问题:
I answer myself having found a possible reason of the problem. The problem arise just with a single specific Bot I created in past (and I removed from a group). As specificed in question:
-
第1步:
创建后,我补充说,机器人上的组跟2个用户(我和另一个人)。
step 1: After creation I added that bot on a group with 2 users: (myself and a second person).
第2步:
后来我删除从组机器人。
step 2: Afterward I removed that bot from the group.
第3步:
我用机器人来测试我的 BOTserver
发送SendMessage函数OD回复网络挂接更新。
现在,我经历了提到403分之400错误。
step 3: I used that bot to test my BOTserver sending SendMessage od reply to webhook update. Now i experienced the mentioned 400/403 errors.
第4步:
我的删除线的机器人,与BotFather聊天。
step 4: I DELETED that Bot, chatting with BotFather.
第5步:
我再次创造了相同的机器人与** SAME identichal名*
step 5: I created again the same Bot with the **SAME identichal name*
第六步:
我再次测试,一个我惜售常用问题:
Step 6: I tested again, an I rised the usual issue:
电报API返回的错误。 (OK:假,错误_ code:401,说明:[错误]:未经授权):
第7步:
我创建了新的bot(S)是不同姓名(或名称)
最后,没有更多的错误!
Step 7: I created new bot(s) with different name(s) Finally, no more errors!
我公平的原博特名字留在了错误的电报服务器内部状态。我hypotesis是,从组添加/删除机器人有一些问题/错误。
I fair the original Bot name remained in a "wrong" Telegram server internal status. My hypotesis is that adding/removing Bots from Groups have some problem/bug.
-
删除机器人名创建问题,没有更多的使用名:(
delete the bot name created problems, no more using that "name" :(
重新创建具有不同的名称僵尸。
recreate a bot with different name.
任何类似的经验?
这篇关于电报博特API错误codeS(综合组和频道)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!