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