Open GochoMugo opened 7 years ago
@GochoMugo hi, i use node-telegram-bot-api i used deleteMessage in my bot but the deleteMessage only can delete bot's message, not message that user sent to bot, is it possible to delete user message from bot
@milad145 Please look at the documentation at https://core.telegram.org/bots/api#deletemessage.
@GochoMugo documentation say :
Use this method to delete a message, including service messages, with the following limitations:
- A message can only be deleted if it was sent less than 48 hours ago.
- Bots can delete outgoing messages in groups and supergroups.
- Bots granted can_post_messages permissions can delete outgoing messages in channels.
- If the bot is an administrator of a group, it can delete any message there.
- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
Returns True on success.
but i means the message that user send to bot directly not in channel or group users work with bot directly, when i try to delete that message, i get error
Error: ETELEGRAM: 400 Bad Request: message can't be deleted
@milad145 private chats and groups are special. There is no one total history. Instead, each member has his own copy of history, and he can remove whatever he wants from it without other parties noticing.
@GingerPlusPlus thanks
Thanks @GingerPlusPlus :+1:
References: