Airgram

Guides
/
/
Methods

api.deleteChatHistory()

Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat

Parameters DeleteChatHistoryParams:

NameTypeDescription
chatIdnumber Chat identifier
removeFromChatListboolean Pass true if the chat needs to be removed from the chat list
revokeboolean Pass true to delete chat history for all users
Returns ApiResponse interface:
interface ApiResponse {
  _: 'deleteChatHistory' | 'error'
  airgram: Airgram
  request: {
    method: 'deleteChatHistory'
    params: DeleteChatHistoryParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}