added rest of the buttons (still needs listeners) & reformatted/improved other code
This commit is contained in:
@@ -19,7 +19,7 @@ pub async fn cmd(
|
||||
read_cfg_data(&ctx.data(), false).await;
|
||||
let d = get_mutex_data(&ctx.data().cfg).await?;
|
||||
let d_str = serde_json::to_string(&d)?;
|
||||
let r = send_cmd_json("update_cfg", Some(json!([d_str]))).await;
|
||||
let r = send_cmd_json("update_cfg", Some(json!([d_str])), true).await;
|
||||
|
||||
if r.is_some() && r.unwrap()["value"].as_bool().unwrap() {
|
||||
send_msg(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ pub async fn cmd(
|
||||
let msg = send_msg(ctx, lang!("dc_msg_owner_data_save"), true, true).await.unwrap();
|
||||
data::write_dc_data(ctx.data()).await;
|
||||
data::write_re_data().await;
|
||||
send_cmd_json("stop_praw", None).await;
|
||||
send_cmd_json("stop_praw", None, true).await;
|
||||
|
||||
edit_reply(ctx, msg, lang!("dc_msg_owner_data_save_complete")).await;
|
||||
ctx.serenity_context().set_presence(None, OnlineStatus::Invisible);
|
||||
|
||||
Reference in New Issue
Block a user