Implement audio record management features in AsyncBotDB and AudioRepository
- Added methods to delete audio moderation records and retrieve all audio records in async_db.py. - Enhanced AudioRepository with functionality to delete audio records by file name and retrieve all audio message records. - Improved logging for audio record operations to enhance monitoring and debugging capabilities. - Updated related handlers to ensure proper integration of new audio management features.
This commit is contained in:
@@ -297,6 +297,18 @@ class AsyncBotDB:
|
||||
"""Получает user_id пользователя по message_id для voice bot."""
|
||||
return await self.factory.audio.get_user_id_by_message_id_for_voice_bot(message_id)
|
||||
|
||||
async def delete_audio_moderate_record(self, message_id: int) -> None:
|
||||
"""Удаляет запись из таблицы audio_moderate по message_id."""
|
||||
await self.factory.audio.delete_audio_moderate_record(message_id)
|
||||
|
||||
async def get_all_audio_records(self) -> List[Dict[str, Any]]:
|
||||
"""Получить все записи аудио сообщений."""
|
||||
return await self.factory.audio.get_all_audio_records()
|
||||
|
||||
async def delete_audio_record_by_file_name(self, file_name: str) -> None:
|
||||
"""Удалить запись аудио сообщения по имени файла."""
|
||||
await self.factory.audio.delete_audio_record_by_file_name(file_name)
|
||||
|
||||
# Методы для миграций
|
||||
async def get_migration_version(self) -> int:
|
||||
"""Получение текущей версии миграции."""
|
||||
|
||||
Reference in New Issue
Block a user