diff --git a/cogs/audio.py b/cogs/audio.py index de0bebf5e..1b23a4551 100644 --- a/cogs/audio.py +++ b/cogs/audio.py @@ -391,7 +391,10 @@ class Audio: def empty_cache(self): files = os.listdir("data/audio/cache") for f in files: - os.unlink("data/audio/cache/" + f) + try: + os.unlink("data/audio/cache/" + f) + except PermissionError: # In case it tries to delete the file that it's currently playing + pass def cache_size(self): total = [os.path.getsize("data/audio/cache/" + f) for f in os.listdir("data/audio/cache")] diff --git a/cogs/general.py b/cogs/general.py index aef8a356b..2d2ec62d4 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -202,7 +202,6 @@ class General: Usage example: poll Is this a poll?;Yes;No;Maybe""" message = ctx.message - print(text) if len(text) == 1: if text[0].lower() == "stop": await self.endpoll(message)