add loop command
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::commands::queue::{build_action_row, build_queue_embeds, TRACKS_PER_PAGE};
|
||||
use crate::commands::{delete, join, leave, pause, play, queue, resume, skip, stop};
|
||||
use crate::commands::{delete, join, leave, loop_queue, pause, play, queue, resume, skip, stop};
|
||||
use crate::state::State;
|
||||
use futures::Future;
|
||||
use std::error::Error;
|
||||
@@ -20,6 +20,7 @@ enum InteractionCommand {
|
||||
Stop,
|
||||
Pause,
|
||||
Skip,
|
||||
Loop,
|
||||
Resume,
|
||||
Leave,
|
||||
Join,
|
||||
@@ -112,6 +113,9 @@ impl Handler {
|
||||
InteractionCommand::Skip => {
|
||||
spawn(skip(interaction, Arc::clone(&self.state)))
|
||||
}
|
||||
InteractionCommand::Loop => {
|
||||
spawn(loop_queue(interaction, Arc::clone(&self.state)))
|
||||
}
|
||||
InteractionCommand::Resume => {
|
||||
spawn(resume(interaction, Arc::clone(&self.state)))
|
||||
}
|
||||
@@ -196,6 +200,7 @@ fn parse_interaction_command(command: &CommandData) -> InteractionCommand {
|
||||
"stop" => InteractionCommand::Stop,
|
||||
"pause" => InteractionCommand::Pause,
|
||||
"skip" => InteractionCommand::Skip,
|
||||
"loop" => InteractionCommand::Loop,
|
||||
"resume" => InteractionCommand::Resume,
|
||||
"leave" => InteractionCommand::Leave,
|
||||
"join" => InteractionCommand::Join,
|
||||
|
||||
Reference in New Issue
Block a user