editMessageMedia(media, form = {}) {
    const regexAttach = /attach:\/\/.+/;

    if (typeof media.media === 'string' && regexAttach.test(media.media)) {
      const opts = {
        qs: form,
      };

      opts.formData = {};

      const payload = Object.assign({}, media);
      delete payload.media;

      try {
        const attachName = String(0);
        const [formData] = this._formatSendData(
          attachName,
          media.media.replace('attach://', ''),
          media.fileOptions
        );

        if (formData) {
          opts.formData[attachName] = formData[attachName];
          payload.media = `attach://${attachName}`;
        } else {
          throw new errors.FatalError(`Failed to process the replacement action for your ${media.type}`);
        }
      } catch (ex) {
        return Promise.reject(ex);
      }

      opts.qs.media = stringify(payload);

      return this._request('editMessageMedia', opts);
    }

    form.media = stringify(media);

    return this._request('editMessageMedia', { form });
  }
Use this method to edit animation, audio, document, photo, or video messages.

If a message is a part of a message album, then it can be edited only to a photo or a video.

Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded.
Use previously uploaded file via its file_id or specify a URL.

Note: You **must provide one of chat_id, message_id, or inline_message_id** in your request.

@param {Object} media  A JSON-serialized object for a new media content of the message
@param {Object} [options] Additional Telegram query options (provide either one of chat_id, message_id, or inline_message_id here)
@return {Promise} On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api#message) is returned, otherwise True is returned
@see https://core.telegram.org/bots/api#editmessagemedia