Support ephemeral reminder confirmations

This commit is contained in:
jude
2023-05-11 19:40:33 +01:00
parent 4b42966284
commit aa931328b0
8 changed files with 171 additions and 25 deletions

View File

@ -91,7 +91,7 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
if Path::new("/etc/reminder-rs/config.env").exists() {
dotenv::from_path("/etc/reminder-rs/config.env")?;
} else {
dotenv::from_path(".env")?;
let _ = dotenv::dotenv();
}
let discord_token = env::var("DISCORD_TOKEN").expect("Missing DISCORD_TOKEN from environment");
@ -112,6 +112,16 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
],
..moderation_cmds::allowed_dm()
},
poise::Command {
subcommands: vec![poise::Command {
subcommands: vec![
moderation_cmds::set_ephemeral_confirmations(),
moderation_cmds::unset_ephemeral_confirmations(),
],
..moderation_cmds::ephemeral_confirmations()
}],
..moderation_cmds::settings()
},
moderation_cmds::webhook(),
poise::Command {
subcommands: vec![