aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme/create.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2019-11-17 22:51:59 -0500
committerNathan Perry <np@nathanperry.dev>2019-11-17 22:51:59 -0500
commit8b2ccf363ac6894c21e256844948c8327645f0db (patch)
treef6742f2d7905613b8c0404bba46e237f984a8da2 /src/commands/meme/create.rs
parent2a38c282dd57c2051a568549d62c80d6036e8920 (diff)
mostly fixed
Diffstat (limited to 'src/commands/meme/create.rs')
-rw-r--r--src/commands/meme/create.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/commands/meme/create.rs b/src/commands/meme/create.rs
index 0851961..7f590b1 100644
--- a/src/commands/meme/create.rs
+++ b/src/commands/meme/create.rs
@@ -7,13 +7,25 @@ use std::{
};
use diesel::result::Error as DieselError;
+use log::{
+ debug,
+ error,
+ warn,
+};
use serenity::{
- framework::standard::{Args, Delimiter},
+ framework::standard::{
+ Args, CommandResult,
+ Delimiter,
+ macros::command,
+ },
model::channel::Message,
prelude::*,
};
use url::Url;
+use anyhow::anyhow;
+use lazy_static::lazy_static;
+
use crate::{
audio::{
parse_times,
@@ -34,7 +46,7 @@ lazy_static! {
}
#[command]
-pub fn addmeme(ctx: &mut Context, msg: &Message, args: Args) -> Result<()> {
+pub fn addmeme(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
let mut args = Args::new(args.rest(), delims.as_ref());
let title = args.single_quoted::<String>()?;
@@ -81,7 +93,7 @@ pub fn addmeme(ctx: &mut Context, msg: &Message, args: Args) -> Result<()> {
}
#[command]
-pub fn addaudiomeme(ctx: &mut Context, msg: &Message, args: Args) -> Result<()> {
+pub fn addaudiomeme(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
let mut args = Args::new(args.rest(), delims.as_ref());
let title = args.single_quoted::<String>()?;