Skip to content

Commit

Permalink
this should be it.
Browse files Browse the repository at this point in the history
  • Loading branch information
NNTin committed Jan 25, 2019
1 parent f59d6b2 commit 3f38430
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions bot/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#from .utils.dataIO import fileIO
from bot.utils.dataIO import fileIO
try:
from utils.dataIO import fileIO
except ModuleNotFoundError:
from bot.utils.dataIO import fileIO
import os

os.chdir(os.path.dirname(__file__))
Expand Down
6 changes: 3 additions & 3 deletions bot/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
sys.path.insert(0, REQS_DIR)
IS_WINDOWS = os.name == "nt"
PYTHON_OK = sys.version_info >= (3, 5, 3) and sys.version_info < (3, 7)
REQS_TXT = "../requirements.txt"
REQS_TXT = os.getcwd() + "/requirements.txt"
INTRO = ("==============================\n"
"discord-twitter-bot - Launcher\n"
"==============================\n")


class Configuration:
def __init__(self):
self.data = fileIO("config.json", "load")
self.data = fileIO("bot/config.json", "load")

def authenticate(self):
auth = tweepy.OAuthHandler(self.data['Twitter']['consumer_key'],
Expand Down Expand Up @@ -347,7 +347,7 @@ def get_bool(prompt):


def check_files():
f = "config.json"
f = "bot/config.json"
if not fileIO(f, "check"):
print("config.json does not exist. Creating empty config.json...")
fileIO(f, "save", {
Expand Down
4 changes: 2 additions & 2 deletions bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from tweepy import OAuthHandler, Stream
from time import gmtime, strftime
from time import sleep
from bot.config import config
from bot.utils.processor import Processor
from config import config
from utils.processor import Processor
#from .config import config
#from .utils.processor import Processor
import urllib3
Expand Down

0 comments on commit 3f38430

Please sign in to comment.