telegram.error.BadRequest:没有足够的权限向聊天室发送短信

问题描述 投票:0回答:1

在几个小时内,当我尝试向我的机器人是管理员的频道发送消息时,我遇到了问题。它工作了好几个星期,但我发现它现在给了我一个错误。

import telegram
import asyncio

token = 'your_token'
async def bot_send_message(msg, chat_id):
    bot = telegram.Bot(token)
    token = token
    async with bot:
        await bot.send_message(text=msg, chat_id=chat_id)
chat_id = 'your_chat_id'
asyncio.run(bot_send_message('msg', chat_id=chat_id))

错误是:

telegram.error.BadRequest: Not enough rights to send text messages to the chat

我的机器人是频道的管理员。之前还好好的。

python telegram python-telegram-bot
1个回答
0
投票

你并不孤单! 我发现与陷入这个问题的人们进行了某种聊天https://github.com/telegraf/telegraf/discussions/1833

问题于 UTC 时间 01:30 左右开始,实际上仅适用于向频道发送消息的机器人

© www.soinside.com 2019 - 2024. All rights reserved.