diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 12:55:35 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:16:01 -0400 |
| commit | ffba60b278162707bc4eb004c3bfb6b2e9595213 (patch) | |
| tree | edf8172ecad59d46a6056944fd9e79f7dfb327c2 /src/commands/today | |
| parent | fe467f60d99efa54f2ef64606e7d39b9b06d7294 (diff) | |
rework to use songbird
Diffstat (limited to 'src/commands/today')
| -rw-r--r-- | src/commands/today/mod.rs | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/src/commands/today/mod.rs b/src/commands/today/mod.rs index 0a0ba7b..7f1dca7 100644 --- a/src/commands/today/mod.rs +++ b/src/commands/today/mod.rs @@ -1,5 +1,4 @@ use chrono::Duration; -use either::Left; use lazy_static::lazy_static; use log::debug; use rand::{ @@ -15,13 +14,14 @@ use serenity::{ model::channel::Message, prelude::*, }; +use songbird::input::YoutubeDl; +use tap::Conv; use crate::{ - audio::{ - PlayArgs, - PlayQueue, - }, + bot::HttpKey, + commands::songbird, util, + CONFIG, }; mod prelude; @@ -50,19 +50,6 @@ pub struct TodayArgs { pub end: Option<Duration>, } -impl TodayArgs { - #[inline] - pub fn as_play_args(&self, msg: &Message) -> PlayArgs { - PlayArgs { - initiator: "you have done this to yourself :^)".to_string(), - data: Left(self.url.to_owned()), - sender_channel: msg.channel_id, - start: self.start, - end: self.end, - } - } -} - lazy_static! { static ref ALL: Vec<fn(chrono::NaiveDateTime) -> TodayIter> = vec