R.Q*_*iga -1 python telegram-bot
我在尝试删除时收到以下错误Message:
2018-04-10 13:58:57,646 (__init__.py:292 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:
[b'{"ok":false,"error_code":400,"description":"Bad Request: message can\'t be deleted"}']"
Run Code Online (Sandbox Code Playgroud)
为什么留言无法删除?
import config
import telebot
bot = telebot.TeleBot(config.token)
@bot.message_handler(content_types=["text"])
def repeat_all_messages(message):
bot.send_message(message.chat.id, 'Hello World')
bot.delete_message(message.chat.id, message.message_id)
if __name__ == '__main__':
bot.polling(none_stop=True)
Run Code Online (Sandbox Code Playgroud)