mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-10-03 07:48:58 +02:00
fixed delete on !stop
This commit is contained in:
parent
ba5ce20e10
commit
22b270f9d4
1 changed files with 5 additions and 2 deletions
5
bot.py
5
bot.py
|
@ -9,6 +9,7 @@ from config import *
|
|||
from requests import get
|
||||
from json import loads
|
||||
from os.path import isfile
|
||||
from os import listdir
|
||||
from os import rename, remove
|
||||
from youtube_dl import YoutubeDL
|
||||
from time import time
|
||||
|
@ -472,7 +473,9 @@ async def checkForNextSong():#background task, that runns every seccond and chec
|
|||
await player.disconnect()
|
||||
player = None
|
||||
playerServer = None#allow everyone to invite the music bot
|
||||
remove("*.mp3")#delete all mp3 files
|
||||
for files in listdir("."):#delete all mp3 files
|
||||
if files.endswith(".mp3"):
|
||||
remove(files)
|
||||
else:
|
||||
playing = True#set playing to true and play the next file
|
||||
player.play(discord.FFmpegPCMAudio(playerQue[0]))
|
||||
|
|
Loading…
Reference in a new issue