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 7984c5d19f
commit 6953dbb326
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 4 additions and 0 deletions

View File

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