diff --git a/LogBot/logbot.py b/LogBot/logbot.py index d31f50a..ddef5d4 100644 --- a/LogBot/logbot.py +++ b/LogBot/logbot.py @@ -76,8 +76,8 @@ class Logbot(Bot): os.path.basename(parsed_url.path).replace(" ", "_").replace("%20", "_") ) # safe url's self.log.info(f"as the file: { filename }") - roomname = re.sub(r"@.*", "", message.room) - path = os.path.join(self.output, roomname, media_type) + folder_name = self.db[message.room]["folder"] + path = os.path.join(self.output, folder_name, media_type) if not os.path.isdir(path): os.mkdir(path) file_path = os.path.join(path, filename)