def attach_file(file, filename: nil, spoiler: nil)
      raise ArgumentError, 'Argument is not a file!' unless file.is_a?(File)

      @file = file
      @filename = filename
      @file_spoiler = spoiler
      nil
    end
def attach_file(file, filename: nil, spoiler: nil)
      raise ArgumentError, 'Argument is not a file!' unless file.is_a?(File)

      @file = file
      @filename = filename
      @file_spoiler = spoiler
      nil
    end
Attaches a file to the message event and converts the message into
 a caption.
 @param file [File] The file to be attached
 @param filename [String] Overrides the filename of the uploaded file
 @param spoiler [true, false] Whether or not this file should appear as a spoiler.