diff options
Diffstat (limited to 'src/commands/meme/create.rs')
| -rw-r--r-- | src/commands/meme/create.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands/meme/create.rs b/src/commands/meme/create.rs index 1c12f2a..ef6090e 100644 --- a/src/commands/meme/create.rs +++ b/src/commands/meme/create.rs @@ -110,6 +110,8 @@ pub async fn addmeme(ctx: &Context, msg: &Message, args: Args) -> CommandResult #[command] pub async fn addaudiomeme(ctx: &Context, msg: &Message, args: Args) -> CommandResult { + debug!("running addaudiomeme"); + let mut args = Args::new(args.rest(), DELIMS.as_ref()); let title = args.single_quoted::<String>()?; @@ -117,7 +119,7 @@ pub async fn addaudiomeme(ctx: &Context, msg: &Message, args: Args) -> CommandRe let elems = audio_str.split_whitespace().collect::<Vec<_>>(); - if elems.len() == 0 { + if elems.is_empty() { util::send(ctx, msg.channel_id, "are you stupid", msg.tts).await?; return Err(anyhow!("no audio link was provided").into()); } @@ -127,6 +129,7 @@ pub async fn addaudiomeme(ctx: &Context, msg: &Message, args: Args) -> CommandRe let (start, end) = parse_times(opts); let youtube_url = util::ytdl_url(audio_link.as_str()).await?; + debug!("got download url: {youtube_url}"); let duration_opts = if let Some(e) = end { vec