Add unit tests

This commit is contained in:
jude
2024-02-24 15:01:54 +00:00
parent dd7e681285
commit 53e13844f9
6 changed files with 177 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use crate::{Context, Error};
/// Configure whether other users can set reminders to your direct messages
#[poise::command(slash_command, rename = "dm")]
#[cfg(not(test))]
pub async fn allowed_dm(_ctx: Context<'_>) -> Result<(), Error> {
Ok(())
}

View File

@ -33,6 +33,7 @@ impl Recordable for Options {
/// Allow other users to set reminders in your direct messages
#[poise::command(slash_command, rename = "allow", identifying_name = "set_allowed_dm")]
#[cfg(not(test))]
pub async fn set(ctx: Context<'_>) -> Result<(), Error> {
(Options {}).run(ctx).await
}