Support ephemeral reminder confirmations
This commit is contained in:
12
src/main.rs
12
src/main.rs
@ -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![
|
||||
|
Reference in New Issue
Block a user