[F] Fix circular import

This commit is contained in:
Hykilpikonna
2020-11-22 12:54:54 -05:00
parent 0512e83b45
commit aa5e0711a7
3 changed files with 9 additions and 5 deletions
+4 -4
View File
@@ -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())
+4
View File
@@ -0,0 +1,4 @@
import os
token = os.environ['TG_TOKEN']
dbPath = 'database.json'
+1 -1
View File
@@ -1,6 +1,6 @@
import json
from src.bot import dbPath
from src.constants import dbPath
class Database: