1
mirror of git://git.acid.vegas/scroll.git synced 2024-11-07 16:56:42 +00:00

Fixed handling missing files

This commit is contained in:
Dionysus 2023-06-02 15:15:55 -04:00
parent 4c903645c4
commit 8314e8a1a7
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -252,8 +252,9 @@ class Bot():
self.playing = True self.playing = True
self.loops[chan] = asyncio.create_task(self.play(chan, random.choice(self.db))) self.loops[chan] = asyncio.create_task(self.play(chan, random.choice(self.db)))
else: 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: if ascii:
ascii = ascii[0]
if ascii.startswith('root/'): if ascii.startswith('root/'):
ascii = ascii.split('/')[1] ascii = ascii.split('/')[1]
self.playing = True self.playing = True