Fixed incorrect path when playing art from the root directory

This commit is contained in:
Dionysus 2023-06-05 14:26:33 -04:00
parent d714469d98
commit a67d02291e
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
1 changed files with 2 additions and 1 deletions

View File

@ -253,8 +253,9 @@ class Bot():
query = args[1]
results = [dir+'/'+ascii for dir in self.db for ascii in self.db[dir] if query == ascii]
if results:
results = results[0].replace('root/','')
self.playing = True
self.loops[chan] = asyncio.create_task(self.play(chan, results[0]))
self.loops[chan] = asyncio.create_task(self.play(chan, results))
else:
await self.irc_error(chan, 'no results found', query)
except (UnicodeDecodeError, UnicodeEncodeError):