dev@locazia: fix start
This commit is contained in:
parent
3e16e7e3ac
commit
ee4d08cb67
|
|
@ -1,6 +1,8 @@
|
|||
from aiogram import Bot, types
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from sqlalchemy import and_
|
||||
|
||||
from app.core.logger import make_log
|
||||
from app.core.models.messages import KnownTelegramMessage
|
||||
from app.core._config import TELEGRAM_API_KEY, CLIENT_TELEGRAM_API_KEY
|
||||
|
|
@ -45,9 +47,12 @@ class Wrapped_CBotChat(T, PlayerTemplates):
|
|||
if message_type == 'common':
|
||||
ci = 0
|
||||
for oc_msg in self.db_session.query(KnownTelegramMessage).filter(
|
||||
KnownTelegramMessage.type == 'common',
|
||||
KnownTelegramMessage.chat_id == self._chat_id,
|
||||
KnownTelegramMessage.deleted == False
|
||||
and_(
|
||||
KnownTelegramMessage.type == 'common',
|
||||
KnownTelegramMessage.bot_id == self.bot_id,
|
||||
KnownTelegramMessage.chat_id == self._chat_id,
|
||||
KnownTelegramMessage.deleted == False
|
||||
)
|
||||
).all():
|
||||
await self.delete_message(oc_msg.message_id)
|
||||
ci += 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue