Add message edit records + work on guilds.

This commit is contained in:
Paul Makles
2020-04-06 12:58:55 +01:00
parent 3609b7cf10
commit 8e908ce105
11 changed files with 267 additions and 62 deletions

View File

@@ -1,13 +1,22 @@
use serde::{ Deserialize, Serialize };
use bson::{ UtcDateTime };
#[derive(Serialize, Deserialize, Debug)]
pub struct PreviousEntry {
pub content: String,
pub time: UtcDateTime,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct Message {
#[serde(rename = "_id")]
pub id: String,
// pub nonce: String, used internally
pub channel: String,
pub author: String,
pub content: String,
pub edited: Option<UtcDateTime>,
pub edited: Option<UtcDateTime>,
pub previous_content: Option<Vec<PreviousEntry>>
}