WIP on #11
This commit is contained in:
parent
b719019dbd
commit
5207baf83f
1 changed files with 4 additions and 2 deletions
|
@ -247,9 +247,11 @@ class Mybot(commands.Cog):
|
|||
audio_file = random.choice([f"{f}" for f in Path(self.audio_path + '/').glob('**/*.mp3')])
|
||||
else:
|
||||
folder = folder.lower()
|
||||
audio_file = random.choice([f"{f}" for f in Path(self.audio_path + '/').glob('**/*.mp3') if folder in str(f).lower()])
|
||||
audio_file = [f"{f}" for f in Path(self.audio_path + '/').glob('**/*.mp3') if folder in str(f).lower()]
|
||||
if not audio_file:
|
||||
ctx.channel.send("%s not found" % folder)
|
||||
else:
|
||||
audio_file = random.choice(audio_file)
|
||||
self.sounds.append((audio_file, ctx))
|
||||
except:
|
||||
e = exc_info()[0]
|
||||
|
|
Loading…
Reference in a new issue