Skip to main content
FileAttachment is a representation of a file attached to a message. Passed into channel.send_files, message.send_files, and message.reply_with_files.

FileAttachment

Fields


Construction

FileAttachment::new

Creates an attachment with the given name and contents.
Panics if name is empty or data is empty.