Restructure imports

This commit is contained in:
2022-02-05 11:25:48 +01:00
parent d8bb26ab9b
commit 60b7c6d50d

View File

@@ -1,9 +1,14 @@
#!/usr/bin/python3
# Core libraries
import json
from telethon import TelegramClient, events, functions, types
# Configuration
# Python apparently has no better way of doing this...
import sys
sys.path.append("/var/telelog")
from telethon import TelegramClient, events, functions, types
from config import *
client = TelegramClient('/var/telelog/log', api_id, api_hash)
@client.on(events.NewMessage)
@@ -51,7 +56,6 @@ async def log(event):
await event.edit(f.read())
if msg.startswith('.tl.set'):
import json
key = msg.split()[1]
arg = msg.split()[2]
with open('/var/telelog/settings.json', 'r+') as settings: