code: async def delete_messages(self, entity, message_ids, *, revoke=True):
          
          if not utils.is_list_like(message_ids):
              message_ids = (message_ids,)
  
          message_ids = (
              m.id if isinstance(m, (
                  types.Message, types.MessageService, types.MessageEmpty))
              else int(m) for m in message_ids
          )
  
          entity = await self.get_input_entity(entity) if entity else None
          if isinstance(entity, types.InputPeerChannel):
              return await self([functions.channels.DeleteMessagesRequest(
                           entity, list(c)) for c in utils.chunks(message_ids)])
          else:
              return await self([functions.messages.DeleteMessagesRequest(
                           list(c), revoke) for c in utils.chunks(message_ids)])
docs: Deletes a message from a chat, optionally "for everyone".
  
          Args:
              entity (`entity`):
                  From who the message will be deleted. This can actually
                  be ``None`` for normal chats, but **must** be present
                  for channels and megagroups.
  
              message_ids (`list` | `int` | `Message <telethon.tl.custom.message.Message>`):
                  The IDs (or ID) or messages to be deleted.
  
              revoke (`bool`, optional):
                  Whether the message should be deleted for everyone or not.
                  By default it has the opposite behaviour of official clients,
                  and it will delete the message for everyone.
  
                  `Since 24 March 2019
                  <https://telegram.org/blog/unsend-privacy-emoji>`_, you can
                  also revoke messages of any age (i.e. messages sent long in
                  the past) the *other* person sent in private conversations
                  (and of course your messages too).
  
                  Disabling this has no effect on channels or megagroups,
                  since it will unconditionally delete the message for everyone.
  
          Returns:
              A list of :tl:`AffectedMessages`, each item being the result
              for the delete calls of the messages in chunks of 100 each.