From 8314e8a1a7c01a2cf41a0aea329c3400d7d4358f Mon Sep 17 00:00:00 2001 From: acidvegas Date: Fri, 2 Jun 2023 15:15:55 -0400 Subject: [PATCH] Fixed handling missing files --- scroll.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scroll.py b/scroll.py index 3afb8d9..e707958 100644 --- a/scroll.py +++ b/scroll.py @@ -252,8 +252,9 @@ class Bot(): self.playing = True self.loops[chan] = asyncio.create_task(self.play(chan, random.choice(self.db))) else: - ascii = [dir+'/'+option for dir in self.db if option in self.db[dir]][0] + ascii = [dir+'/'+option for dir in self.db if option in self.db[dir]] if ascii: + ascii = ascii[0] if ascii.startswith('root/'): ascii = ascii.split('/')[1] self.playing = True