This commit is contained in:
parent
a8723bb3ee
commit
282b066fcf
1 changed files with 7 additions and 1 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import threading
|
||||||
|
|
||||||
import config
|
import config
|
||||||
import database
|
import database
|
||||||
|
|
@ -79,7 +80,12 @@ def recreate_post(
|
||||||
|
|
||||||
old = database.get_message_data(task_id)
|
old = database.get_message_data(task_id)
|
||||||
if old:
|
if old:
|
||||||
notifier.delete(old["message_id"])
|
threading.Thread(
|
||||||
|
target=notifier.delete,
|
||||||
|
args=(old["message_id"],),
|
||||||
|
daemon=True,
|
||||||
|
name=f"delete-{old['message_id']}",
|
||||||
|
).start()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
message_id = notifier.send(full_text, keyboard)
|
message_id = notifier.send(full_text, keyboard)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue