From 6525c9ff9dffef9b3c4df0782c9c11470a9fa2f4 Mon Sep 17 00:00:00 2001
From: tec <tec@ucc.gu.uwa.edu.au>
Date: Thu, 15 Aug 2019 14:03:31 +0800
Subject: [PATCH] Add timestamp to embeds

---
 src/main.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 2223ff2..2729df1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -331,6 +331,7 @@ fn create_motion(ctx: &Context, msg: &Message, topic: &str) {
             embed.description(desc.build());
             embed.field("Status", "Under Consideration", true);
             embed.field("Votes", "For: 0\nAgainst: 0\nAbstain: 0", true);
+            embed.timestamp(msg.timestamp.to_rfc3339());
             embed
         });
         m.reactions(vec![
@@ -372,6 +373,7 @@ fn create_poll(ctx: &Context, msg: &Message, topic: &str) {
             desc.mention(&msg.author);
             desc.push(" wants to know what you think.");
             embed.description(desc.build());
+            embed.timestamp(msg.timestamp.to_rfc3339());
             embed
         });
         m.reactions(vec![APPROVE_REACT, DISAPPROVE_REACT, UNSURE_REACT]);
@@ -514,6 +516,11 @@ fn update_motion(
                 ),
                 true,
             );
+            e.timestamp(
+                old_embed
+                    .timestamp
+                    .expect("Expected embed to have timestamp"),
+            );
             e
         })
     }) {
-- 
GitLab