|
@ -132,9 +132,8 @@ class Logbot(Bot): |
|
|
new_key = str(int(keys[-1]) + 1) |
|
|
new_key = str(int(keys[-1]) + 1) |
|
|
if media_post: |
|
|
if media_post: |
|
|
self.db[message.room]["messages"][new_key] = {} |
|
|
self.db[message.room]["messages"][new_key] = {} |
|
|
self.db[message.room]["messages"][new_key]['post'] = '' |
|
|
self.db[message.room]["messages"][new_key]['post'] = media_post |
|
|
self.db[message.room]["messages"][new_key]['media'] = {} |
|
|
self.db[message.room]["messages"][new_key]['media'] = {} |
|
|
self.db[message.room]["messages"][new_key]['media']['post'] = media_post |
|
|
|
|
|
self.db[message.room]["messages"][new_key]['media']['type'] = media_type |
|
|
self.db[message.room]["messages"][new_key]['media']['type'] = media_type |
|
|
self.db[message.room]["messages"][new_key]['media']['url'] = os.path.join("https://vvvvvvaria.org/logs/", media_url) |
|
|
self.db[message.room]["messages"][new_key]['media']['url'] = os.path.join("https://vvvvvvaria.org/logs/", media_url) |
|
|
self.db[message.room]["messages"][new_key]['media']['size'] = media_size |
|
|
self.db[message.room]["messages"][new_key]['media']['size'] = media_size |
|
@ -179,9 +178,7 @@ class Logbot(Bot): |
|
|
|
|
|
|
|
|
if not os.path.exists(room_path): |
|
|
if not os.path.exists(room_path): |
|
|
os.mkdir(room_path) |
|
|
os.mkdir(room_path) |
|
|
stylesheet_path = os.path.join( |
|
|
stylesheet_path = os.path.join("stylesheets", self.db[room]["stylesheet"] + ".css") |
|
|
"stylesheets", self.db[room]["stylesheet"] + ".css" |
|
|
|
|
|
) |
|
|
|
|
|
stylesheet_dest_path = os.path.join(room_path, "stylesheet.css") |
|
|
stylesheet_dest_path = os.path.join(room_path, "stylesheet.css") |
|
|
shutil.copy(stylesheet_path, stylesheet_dest_path) |
|
|
shutil.copy(stylesheet_path, stylesheet_dest_path) |
|
|
self.log.info(f"Created a folder for: { room }") |
|
|
self.log.info(f"Created a folder for: { room }") |
|
|