Restructure imports
This commit is contained in:
10
bin/telelog
10
bin/telelog
@@ -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:
|
||||
|
Reference in New Issue
Block a user