fixed $look time
. fixed pause message
This commit is contained in:
parent
4bc7b36fd1
commit
38e2767f99
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1175,7 +1175,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.2.0"
|
version = "1.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.2.0"
|
version = "1.2.1"
|
||||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -152,15 +152,26 @@ async fn pause(ctx: &Context, msg: &Message, args: String) {
|
|||||||
|
|
||||||
match pause_until {
|
match pause_until {
|
||||||
Ok(timestamp) => {
|
Ok(timestamp) => {
|
||||||
|
let dt = NaiveDateTime::from_timestamp(timestamp, 0);
|
||||||
|
|
||||||
channel.paused = true;
|
channel.paused = true;
|
||||||
channel.paused_until = Some(NaiveDateTime::from_timestamp(timestamp, 0));
|
channel.paused_until = Some(dt);
|
||||||
|
|
||||||
channel.commit_changes(&pool).await;
|
channel.commit_changes(&pool).await;
|
||||||
|
|
||||||
let _ = msg
|
let content = user_data
|
||||||
.channel_id
|
.response(&pool, "pause/paused_until")
|
||||||
.say(&ctx, user_data.response(&pool, "pause/paused_until").await)
|
.await
|
||||||
.await;
|
.replace(
|
||||||
|
"{}",
|
||||||
|
&user_data
|
||||||
|
.timezone()
|
||||||
|
.timestamp(timestamp, 0)
|
||||||
|
.format("%Y-%m-%d %H:%M:%S")
|
||||||
|
.to_string(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let _ = msg.channel_id.say(&ctx, content).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
@ -530,7 +541,7 @@ LIMIT
|
|||||||
TimeDisplayType::Absolute => user_data
|
TimeDisplayType::Absolute => user_data
|
||||||
.timezone()
|
.timezone()
|
||||||
.timestamp(reminder.time as i64, 0)
|
.timestamp(reminder.time as i64, 0)
|
||||||
.format("%Y-%m-%D %H:%M:%S")
|
.format("%Y-%m-%d %H:%M:%S")
|
||||||
.to_string(),
|
.to_string(),
|
||||||
TimeDisplayType::Relative => {
|
TimeDisplayType::Relative => {
|
||||||
let now = SystemTime::now()
|
let now = SystemTime::now()
|
||||||
|
Loading…
Reference in New Issue
Block a user