Skip to content

Commit

Permalink
Update 4 files
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Aug 6, 2023
1 parent 48f6bc2 commit 686ccd0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ downloads
kreacher.session
kreacher_env
my_env
.env
.env
tester.py

# dbs
queues.json.lock
users.json.lock
vcs.json.lock
9 changes: 8 additions & 1 deletion tlg_bot/dbs/queues.json
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
{"data": []}
{
"data": [
{
"chat_id": 1234,
"id": 261700356171159570
}
]
}
3 changes: 3 additions & 0 deletions tlg_bot/dbs/vcs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"data": []
}
3 changes: 3 additions & 0 deletions tlg_bot/helpers/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def add_to_queue(chat, name, url, ref, type):
await dbq.add({"id": chat.id})
if dbq.getBy(chat.id):
chat_queue = QUEUE[chat.id]
await dbq.updateById(
chat.id, {"name": name, "url": url, "ref": ref, "type": type}
)
chat_queue.append([name, url, ref, type])
return int(len(chat_queue) - 1)
if chat.id not in active:
Expand Down

0 comments on commit 686ccd0

Please sign in to comment.