From b5edcad5480bb18adc800e0c384da56058533235 Mon Sep 17 00:00:00 2001 From: alsoGAMER Date: Wed, 2 Dec 2020 18:12:46 +0100 Subject: [PATCH] Fixed circular import Added finalized .gitignore --- .gitignore | 150 ++++++++++++++++++++++++++++++++++++++ BotBase/config.example.py | 1 + 2 files changed, 151 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64c90ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,150 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +BotEnv +BotEnv/ +BotEnv/* + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# SQlite3 database and session files +database.db +*.session +*.session-journal + +# Config file +/BotBase/config.py + +# idea +.idea/.gitignore +.idea/codeStyles/ +.idea/dataSources.xml +.idea/inspectionProfiles/ +.idea/misc.xml +.idea/modules.xml +.idea/sqldialects.xml +.idea/vcs.xml diff --git a/BotBase/config.example.py b/BotBase/config.example.py index 104415f..42f8080 100644 --- a/BotBase/config.example.py +++ b/BotBase/config.example.py @@ -122,6 +122,7 @@ DB_SET_USER = "INSERT INTO users (id, tg_id, tg_uname, date, banned) VALUES(?, ?, ?, ?, ?)" DB_BAN_USER = "UPDATE users SET banned = 1 WHERE users.tg_id = ?" DB_UNBAN_USER = "UPDATE users SET banned = 0 WHERE users.tg_id = ?" +DB_CHECK_BANNED = "SELECT banned FROM users WHERE users.tg_id = ?" DB_UPDATE_NAME = "UPDATE users SET tg_uname = ? WHERE users.tg_id = ?" DB_GET_USER_BY_NAME = "SELECT * FROM users where users.tg_uname = ?" from BotBase.database.query import check_banned