Reply bot text in post

This commit is contained in:
2023-12-27 15:25:46 +03:00
parent 80918ad07b
commit 915e36890b

View File

@@ -185,14 +185,14 @@ class AdminCommands(Handler):
try: try:
post = await neuroapi.post.get_post_to_post() post = await neuroapi.post.get_post_to_post()
if (post): if (post):
images = MediaGroupBuilder(caption=post.text) images = MediaGroupBuilder(caption=post.text + '\n\nПредложка: @neur0w0men_reply_bot')
image: neuroTypes.Image image: neuroTypes.Image
for image in sorted(post.images, key=lambda x: x.message_id): for image in sorted(post.images, key=lambda x: x.message_id):
images.add_photo(image.file_id, images.add_photo(image.file_id,
has_spoiler=image.has_spoiler) has_spoiler=image.has_spoiler)
await self.bot.send_media_group(self.settings.channel, images.build()) await self.bot.send_media_group(self.settings.channel, images.build())
if message: if message:
await message.answer('Посту успешно опубликован!') await message.answer('Пост успешно опубликован!')
elif message: elif message:
await message.answer('Нет постов') await message.answer('Нет постов')
except Exception as e: except Exception as e: