diff options
| author | Nathan Perry <np@nathanperry.dev> | 2019-11-17 22:51:59 -0500 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2019-11-17 22:51:59 -0500 |
| commit | 8b2ccf363ac6894c21e256844948c8327645f0db (patch) | |
| tree | f6742f2d7905613b8c0404bba46e237f984a8da2 /src/commands/meme/delete.rs | |
| parent | 2a38c282dd57c2051a568549d62c80d6036e8920 (diff) | |
mostly fixed
Diffstat (limited to 'src/commands/meme/delete.rs')
| -rw-r--r-- | src/commands/meme/delete.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/commands/meme/delete.rs b/src/commands/meme/delete.rs index 72226e5..148dfd6 100644 --- a/src/commands/meme/delete.rs +++ b/src/commands/meme/delete.rs @@ -2,8 +2,13 @@ use diesel::{ NotFound, result::Error as DieselError, }; +use log::info; use serenity::{ - framework::standard::Args, + framework::standard::{ + Args, + CommandResult, + macros::command, + }, model::channel::Message, prelude::*, }; @@ -19,7 +24,7 @@ use crate::{ #[command] #[aliases("delmem")] -pub fn delmeme(ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> { +pub fn delmeme(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { let title = args.single_quoted::<String>()?; let conn = connection()?; @@ -34,7 +39,8 @@ pub fn delmeme(ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> { return Ok(()); } - Err(e) + Err(e)?; + Ok(()) } } } |
