[F] Fix circular import
This commit is contained in:
+4
-4
@@ -6,11 +6,11 @@ from telegram.ext import Updater
|
||||
import logging
|
||||
import os
|
||||
|
||||
from src.commands import start
|
||||
from src.commands import *
|
||||
from src.constants import dbPath, token
|
||||
from src.database import Database
|
||||
|
||||
token = os.environ['TG_TOKEN']
|
||||
dbPath = 'database.json'
|
||||
|
||||
database = Database()
|
||||
|
||||
# Main
|
||||
@@ -25,7 +25,7 @@ if __name__ == '__main__':
|
||||
f.close()
|
||||
|
||||
# Create bot
|
||||
bot = telegram.Bot(token=os.environ['TG_TOKEN'])
|
||||
bot = telegram.Bot(token=token)
|
||||
|
||||
# Print bot info
|
||||
print("Bot created: ", bot.getMe())
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import os
|
||||
|
||||
token = os.environ['TG_TOKEN']
|
||||
dbPath = 'database.json'
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import json
|
||||
|
||||
from src.bot import dbPath
|
||||
from src.constants import dbPath
|
||||
|
||||
|
||||
class Database:
|
||||
|
||||
Reference in New Issue
Block a user