code: async def delete_messages(self, messages):
          
          if not isinstance(messages, (list, tuple)):
              messages = list(messages)
  
          if len(messages) == 0:
              return # do nothing
  
          if len(messages) == 1:
              message_id = messages[0].id
              await self._state.http.delete_message(self.id, message_id)
              return
  
          if len(messages) > 100:
              raise ClientException('Can only bulk delete messages up to 100 messages')
  
          message_ids = [m.id for m in messages]
          await self._state.http.delete_messages(self.id, message_ids)
docs: |coro|
  
          Deletes a list of messages. This is similar to :meth:`Message.delete`
          except it bulk deletes multiple messages.
  
          As a special case, if the number of messages is 0, then nothing
          is done. If the number of messages is 1 then single message
          delete is done. If it's more than two, then bulk delete is used.
  
          You cannot bulk delete more than 100 messages or messages that
          are older than 14 days old.
  
          You must have the :attr:`~Permissions.manage_messages` permission to
          use this.
  
          Usable only by bot accounts.
  
          Parameters
          -----------
          messages: Iterable[:class:`abc.Snowflake`]
              An iterable of messages denoting which ones to bulk delete.
  
          Raises
          ------
          ClientException
              The number of messages to delete was more than 100.
          Forbidden
              You do not have proper permissions to delete the messages or
              you're not using a bot account.
          HTTPException
              Deleting the messages failed.