电报机器人不适用于所有用户 [英] Telegram bots not working for all users

查看:46
本文介绍了电报机器人不适用于所有用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了几个 Telegram 机器人.它们适用于我的帐户以及我测试过的其他几个帐户.

I have created several Telegram bots. They work for my account and also on several other accounts that I have tested with.

但我收到几个用户的报告,说机器人从不响应.

But I get reports from several users saying the bots never respond.

是否有一些用户设置会阻止帐户从机器人获取消息?或者任何其他想法为什么它不适用于某些帐户?

It there some user setting that would prevent an account from getting messages from bots? Or any other idea why it would not work for some accounts?

推荐答案

好的,找到问题了,是pebcak.

Okay, found the issue, it was pebcak.

这个问题是因为我们的代码正在访问 json 数据中的 last_name,所以对于在他们的帐户中没有设置姓氏的用户来说,它会失败.

This issue was it was failing for users that had no last name set in their account because our code was accessing the last_name from the json data.

因此请确保您的代码不依赖于名字或姓氏.

So make sure your code does not rely on a first or last name.

这篇关于电报机器人不适用于所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆