fomrat
This commit is contained in:
parent
5b464883bf
commit
e20a21855c
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -46,7 +46,7 @@ async def add_to_queue(ctx, query):
|
||||||
if confidence >= 70 and song_path: # Adjust confidence threshold as needed
|
if confidence >= 70 and song_path: # Adjust confidence threshold as needed
|
||||||
song_name = os.path.relpath(song_path, start=songs_dir) # Get the song name relative to songs_dir
|
song_name = os.path.relpath(song_path, start=songs_dir) # Get the song name relative to songs_dir
|
||||||
queued_songs.append((song_path, song_name))
|
queued_songs.append((song_path, song_name))
|
||||||
await ctx.send(f"Added to queue: {song_name}")
|
await ctx.send(f"**Added to queue:** `{song_name}`")
|
||||||
else:
|
else:
|
||||||
await ctx.send("Sorry, couldn't find a match for that song.")
|
await ctx.send("Sorry, couldn't find a match for that song.")
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ async def play_queued_songs(ctx, voice_channel):
|
||||||
voice_client = await voice_channel.connect()
|
voice_client = await voice_channel.connect()
|
||||||
while queued_songs:
|
while queued_songs:
|
||||||
song_path, song_name = queued_songs.pop(0) # Get the first song in the queue
|
song_path, song_name = queued_songs.pop(0) # Get the first song in the queue
|
||||||
await ctx.send(f"Now playing: {song_name}")
|
await ctx.send(f"**Now playing:** `{song_name}`")
|
||||||
voice_client.play(discord.FFmpegPCMAudio(song_path))
|
voice_client.play(discord.FFmpegPCMAudio(song_path))
|
||||||
while voice_client.is_playing():
|
while voice_client.is_playing():
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
Loading…
Reference in a new issue