add set_id() to FileAttachment

This is so that the id of the Attachment to be sent can just be overwritten by the send() method.
This commit is contained in:
bitfl0wer 2023-05-12 19:18:40 +02:00
parent 1d2ebdd3cd
commit ec37e89cc4
1 changed files with 4 additions and 0 deletions

View File

@ -927,6 +927,10 @@ impl PartialDiscordFileAttachment {
}; };
(content_type, updated_struct) (content_type, updated_struct)
} }
pub fn set_id(&mut self, id: i16) {
self.id = Some(id);
}
} }
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]