From de994a3592cc0733bb6cc8edb76d296902e30154 Mon Sep 17 00:00:00 2001 From: Milka64 Date: Mon, 4 Jan 2021 18:31:32 +0100 Subject: [PATCH] fix welcome error --- kabot/kabot/kabot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 7f2dbe0..26c99c3 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -437,7 +437,7 @@ class Mybot(commands.Cog): user = ctx.message.author.name print(user) try: - audio_file = random.choice([f for f in os.listdir(audio_path + '/%s/' % user) if f.endswith('.mp3')]) + audio_file = random.choice([f for f in os.listdir(self.audio_path + '/%s/' % user) if f.endswith('.mp3')]) audio_file = self.audio_path + '/%s/' % user + audio_file except: audio_file = random.choice([f"{f}" for f in Path(self.audio_path + '/').glob('**/*.mp3')])