From 6953dbb3266ebe62e12af4ac25ac7a1aa9f7ee49 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Fri, 12 May 2023 19:18:40 +0200 Subject: [PATCH] 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. --- src/api/types.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/types.rs b/src/api/types.rs index 5322b95..1952e93 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -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)]