mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 09:10:49 +00:00
Update lots of dependencies
This commit is contained in:
parent
59551f1f6a
commit
3a9a252a1d
8 changed files with 370 additions and 395 deletions
|
@ -216,8 +216,8 @@ fn print_info_message<'a>(
|
|||
contest
|
||||
.start_time_seconds
|
||||
.as_ref()
|
||||
.map(|v| {
|
||||
let ts = Utc.timestamp(*v as i64, 0);
|
||||
.and_then(|v| Utc.timestamp_opt(*v as i64, 0).earliest())
|
||||
.map(|ts| {
|
||||
format!(
|
||||
" | from {} ({})",
|
||||
ts.format("<t:%s:F>"),
|
||||
|
|
|
@ -94,8 +94,11 @@ pub async fn watch_contest(
|
|||
};
|
||||
|
||||
if contest.phase == ContestPhase::Before {
|
||||
let start_time = match contest.start_time_seconds {
|
||||
Some(s) => chrono::Utc.timestamp(s as i64, 0),
|
||||
let start_time = match contest
|
||||
.start_time_seconds
|
||||
.and_then(|x| chrono::Utc.timestamp_opt(x as i64, 0).earliest())
|
||||
{
|
||||
Some(s) => s,
|
||||
None => {
|
||||
channel
|
||||
.send_message(ctx, |f| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue