Skip to content

Commit

Permalink
Update structure project
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkd-Alex committed Aug 14, 2018
1 parent ed59f4d commit ccf2d1c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
27 changes: 19 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ celerybeat-schedule
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

Expand All @@ -103,14 +102,26 @@ venv.bak/
# mypy
.mypy_cache/

assets/
instapy/
# pylint file
googlecl-pylint.rc.txt
assets/chromedriver
quickstart.py
*,cover

# Mac files
.DS_Store

# Storage
instapy.db
logs/
db/

telegram-bot-data/resources
telegram-bot-data/*.txt
# Editors
.idea
.vscode

telegram-bot-data/config.ini
telegram-bot-data/hashtags/
# pytest
tests/logs

# telegram-scheduling
instapy
settings.json
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
os.makedirs("telegram-bot-data")

telegram_token = open("telegram-bot-data/token.txt","r").read().strip()
allowed_id = open("telegram-bot-data/allowed-id.txt","r").read().split("\n")
allowed_id = open("telegram-bot-data/allowed_id.txt","r").read().split("\n")

# Create empty thread variable
global thread_instaPy
Expand All @@ -32,7 +32,7 @@ def _execThread(bot, chat_id, name_job):
global thread_instaPy
if not thread_instaPy or not thread_instaPy.isAlive():
thread_instaPy = Thread(name_job)
thread_instaPy.setTelegram(bot, chat_id)
thread_instaPy.set_telegram(bot, chat_id)
thread_instaPy.start()
else:
bot.send_message(chat_id, text='Bot already executing!')
Expand Down
7 changes: 7 additions & 0 deletions settings.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"telegram_token": "xxxx",
"allowed_id": [
"123123",
"342342"
]
}
Empty file.
5 changes: 0 additions & 5 deletions telegram-bot-data/config.ini.dist

This file was deleted.

Empty file removed telegram-bot-data/token.txt.dist
Empty file.

0 comments on commit ccf2d1c

Please sign in to comment.