Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
telegram_bot_antispammer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иванова Мария Кирилловна
telegram_bot_antispammer
Commits
e2cf6ee0
Commit
e2cf6ee0
authored
Apr 14, 2025
by
Иванова Мария Кирилловна
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Код с db_path в .env
parent
7d0e04c1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
-- SQLite.sql
-- SQLite.sql
+2
-0
.env.sample
.env.sample
+2
-0
sqlite_tools.py
sqlite_tools.py
+2
-2
No files found.
-- SQLite.sql
0 → 100644
View file @
e2cf6ee0
-- SQLite
DELETE
FROM
banned_users
WHERE
id
=
5129976439
;
.env.sample
View file @
e2cf6ee0
...
...
@@ -2,3 +2,4 @@ BOT_TOKEN=
LOG_CHAT_ID=
MAIN_CHAT_ID=
LOG_LEVEL=DEBUG
DB_PATH=
\ No newline at end of file
sqlite_tools.py
View file @
e2cf6ee0
# Функция для создания базы данных и таблиц
import
sqlite3
import
os
def
create_db
():
db_path
=
'users.db'
db_path
=
os
.
getenv
(
"DB_PATH"
)
# Подключаемся к базе данных (если она не существует, она будет создана)
conn
=
sqlite3
.
connect
(
db_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment