better saving
This commit is contained in:
parent
b3601bfbf3
commit
7fe4ce0e23
@ -124,7 +124,6 @@ class QueueAudio(discord.AudioSource):
|
||||
return stream.getvalue()
|
||||
|
||||
def cleanup(self):
|
||||
self.queue.clear()
|
||||
for audio in self.queue:
|
||||
try:
|
||||
audio.cleanup()
|
||||
|
@ -12,6 +12,8 @@ from v6d3music.utils.tor_prefix import tor_prefix
|
||||
|
||||
|
||||
adaas_available = bool(os.getenv('adaasurl'))
|
||||
if adaas_available:
|
||||
print('running real_url through adaas')
|
||||
|
||||
|
||||
async def real_url(url: str, override: bool, tor: bool) -> str:
|
||||
|
@ -28,11 +28,12 @@ register_commands()
|
||||
class MusicClient(discord.Client):
|
||||
async def close(self) -> None:
|
||||
save_task.cancel()
|
||||
await super().close()
|
||||
try:
|
||||
await save_all(False, False)
|
||||
print('saved')
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
await super().close()
|
||||
|
||||
client = MusicClient(
|
||||
intents=discord.Intents(
|
||||
|
Loading…
Reference in New Issue
Block a user