questioning sanity
This commit is contained in:
parent
4d2d0c1101
commit
8ad706e1ee
@ -14,7 +14,7 @@ pub async fn quote_action(
|
|||||||
username: message.author.name.clone(),
|
username: message.author.name.clone(),
|
||||||
quote: message.content.clone(),
|
quote: message.content.clone(),
|
||||||
added_by: ctx.author().id.into(),
|
added_by: ctx.author().id.into(),
|
||||||
added_at: Some(OffsetDateTime::now_utc()),
|
added_at: OffsetDateTime::now_utc(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if quote.user_id == quote.added_by {
|
if quote.user_id == quote.added_by {
|
||||||
@ -40,12 +40,7 @@ pub async fn random_quote(ctx: Context<'_>) -> Result<(), Error> {
|
|||||||
"{}: {}\nQuoted at: <t:{}:f> by <@{}>",
|
"{}: {}\nQuoted at: <t:{}:f> by <@{}>",
|
||||||
quote.username,
|
quote.username,
|
||||||
quote.quote,
|
quote.quote,
|
||||||
if let Some(added_at) = quote.added_at {
|
quote.added_at.unix_timestamp(),
|
||||||
added_at.unix_timestamp()
|
|
||||||
} else {
|
|
||||||
// Use now if added_at is None
|
|
||||||
OffsetDateTime::now_utc().unix_timestamp()
|
|
||||||
},
|
|
||||||
quote.added_by
|
quote.added_by
|
||||||
))
|
))
|
||||||
.allowed_mentions(CreateAllowedMentions::new().empty_users()),
|
.allowed_mentions(CreateAllowedMentions::new().empty_users()),
|
||||||
@ -81,12 +76,7 @@ pub async fn user_quotes(
|
|||||||
"{}: {}\nQuoted at: <t:{}:f> by <@{}>\n",
|
"{}: {}\nQuoted at: <t:{}:f> by <@{}>\n",
|
||||||
quote.username,
|
quote.username,
|
||||||
quote.quote,
|
quote.quote,
|
||||||
if let Some(added_at) = quote.added_at {
|
quote.added_at.unix_timestamp(),
|
||||||
added_at.unix_timestamp()
|
|
||||||
} else {
|
|
||||||
// Use now if added_at is None
|
|
||||||
OffsetDateTime::now_utc().unix_timestamp()
|
|
||||||
},
|
|
||||||
quote.added_by
|
quote.added_by
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user