diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:15:42 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:16:01 -0400 |
| commit | 47817c4166937af24041a93e56ad9f841bf1e8f1 (patch) | |
| tree | a8ec0a674a5a4e5046e1bc92c1c317a48b5e4815 /src/commands/meme/create.rs | |
| parent | ffba60b278162707bc4eb004c3bfb6b2e9595213 (diff) | |
fixups: memes working
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