display less songs in queue message

This commit is contained in:
2024-02-20 21:59:09 +01:00
parent 86641f5c94
commit 47c2c09910
2 changed files with 16 additions and 18 deletions

View File

@@ -24,6 +24,20 @@ pub(crate) async fn play(
interaction.author(),
);
let interaction_response_data = InteractionResponseDataBuilder::new()
.content("Adding tracks to the queue ...")
.flags(MessageFlags::EPHEMERAL)
.build();
let response = InteractionResponse {
kind: InteractionResponseType::ChannelMessageWithSource,
data: Some(interaction_response_data),
};
state
.http
.interaction(interaction.application_id)
.create_response(interaction.id, &interaction.token, &response)
.await?;
let Some(user_id) = interaction.author_id() else {
return Ok(());
};
@@ -42,22 +56,6 @@ pub(crate) async fn play(
debug!("query: {:?}", query);
let interaction_response_data = InteractionResponseDataBuilder::new()
.content("Adding tracks to the queue ...")
.flags(MessageFlags::EPHEMERAL)
.build();
let response = InteractionResponse {
kind: InteractionResponseType::ChannelMessageWithSource,
data: Some(interaction_response_data),
};
state
.http
.interaction(interaction.application_id)
.create_response(interaction.id, &interaction.token, &response)
.await?;
// handle playlist links
let urls = if query.contains("list=") {
get_playlist_urls(query).await?