我正在尝试为我的telegrambot创建一个chat_id
列表,它将允许我的bot向列表中的所有chat_id
发送一条消息。我试过了
listofids = ['191929390', '102938483']
bot.sendMessage(listofids, str("worked"))
但我有个错误
telepot.exception.TelegramError: ('Bad Request: chat not found', 400, {'ok': False, 'error_code': 400, 'description': 'Bad Request: chat not found'})
那么这里出了什么问题,如何解决这个问题呢?你知道吗
semdMessage
方法的chat_id
参数应该是int
,而不是list
或其他iterable。你知道吗如果要向多个收件人发送同一条短信,请循环执行:
相关问题 更多 >
编程相关推荐