mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
Cleanup cache fix
This commit is contained in:
parent
3b04a82519
commit
e54b80b3c9
@ -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")]
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user