using System.IO; namespace Discord { /// /// An image that will be uploaded to Discord. /// public struct Image { public Stream Stream { get; } /// /// Create the image with a Stream. /// /// This must be some type of stream with the contents of a file in it. public Image(Stream stream) { Stream = stream; } #if FILESYSTEM /// /// Create the image from a file path. /// /// /// This file path is NOT validated, and is passed directly into a /// /// The path to the file. public Image(string path) { Stream = File.OpenRead(path); } #endif } }