Very slow Discord bot to play music
Prefer four-space indentation instead of a mix of four and two
queueurls should be queue_urls
else / pass is redundant and can be deleted
It's not a great idea to use a single, statically-named temporary file for your playback. Instead, use tempfile to generate you a random one-off temporary filename. It's possible that the inefficiency you see is actually some kind of contention around your single filename.
while queueurls != [] is better-stated as while len(queue_urls) &gt; 0.
while vcs.is_playing is a polling loop that's probably going to saturate your CPU. At the least, add a sleep(0.1) to the inside of your loop to release your thread from the OS scheduler. Better yet would be a blocking call to your audio library, though I don't know whether that's possible. Based on the documentation, you could wait until an after finalizer hook is called.