fix: stop bot from loading playlists and crashing itself
This commit is contained in:
parent
e56e83213f
commit
84048b1b67
1 changed files with 9 additions and 1 deletions
|
@ -56,7 +56,7 @@ pub async fn attempt_to_queue_song(
|
|||
return Embed::create_error_respose(
|
||||
username,
|
||||
"You are not in my VC",
|
||||
"You have to be in my VC in order to controll the music.",
|
||||
"You have to be in my VC in order to control the music.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,14 @@ pub async fn attempt_to_queue_song(
|
|||
.expect("Guaranteed to exist in the typemap.")
|
||||
};
|
||||
|
||||
if query.contains("youtu") && query.contains("&list=") {
|
||||
return Embed::create_error_respose(
|
||||
username,
|
||||
"Playlists are not supported",
|
||||
"I do not support playlists of any kind, please only provide links to videos"
|
||||
);
|
||||
}
|
||||
|
||||
// Create source
|
||||
let src = if do_search {
|
||||
YoutubeDl::new_search(http_client, query.to_string())
|
||||
|
|
Loading…
Reference in a new issue