mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-14 13:39:42 +03:00
Reply bot text in post
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user