1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-05-24 18:43:25 +00:00

Compare commits

...

10 Commits

Author SHA1 Message Date
er8dd
c027ec656b minor fixes 2024-03-03 00:30:23 +04:00
er8dd
f79a9f317d Merge branch 'main' into stable 2024-03-03 00:10:32 +04:00
er8dd
eeb6c65f36 minor fixes 2024-03-03 00:07:45 +04:00
er8dd
7a0ce10c56 mailing size limit 2024-03-02 20:50:40 +04:00
er8dd
44f39e4de0 Merge branch 'main' into stable 2024-03-02 20:05:23 +04:00
jjki3d
7aacb2e38f Merge branch 'main' into stable 2024-02-17 03:56:11 +04:00
jjki3d
1dd4d4d7fd Merge branch 'main' into stable 2024-01-13 02:29:57 +04:00
jjki3d
02e91a596c Merge branch 'main' into stable 2024-01-13 02:20:53 +04:00
walker
a262d4e488 Merge branch 'main' into stable 2022-11-05 06:11:27 +04:00
mihalin
3e1f89034a fix translations 2022-09-16 21:30:38 +04:00
3 changed files with 9 additions and 3 deletions

View File

@ -10,7 +10,7 @@ Bitcoin:
``bc1qlq7cm5chc8flr3fy8ewk967aknq3dwmxtwn9hl``
Litecoin:
``LTC1QXAJSVZ0LW44AA5NYTUCH8CP2G8X7A4CDASE4Y7``
``ltc1qxajsvz0lw44aa5nytuch8cp2g8x7a4cdase4y7``
Как убрать "Этот бот создан с помощью ..."
----------------

View File

@ -7,9 +7,9 @@ from olgram.settings import TORTOISE_ORM, OlgramSettings
from olgram.utils.permissions import AccessMiddleware
from server.custom import init_redis
import olgram.commands.menu # noqa: F401
import olgram.commands.bots # noqa: F401
import olgram.commands.start # noqa: F401
import olgram.commands.menu # noqa: F401
import olgram.commands.bot_actions # noqa: F401
import olgram.commands.info # noqa: F401
import olgram.commands.promo # noqa: F401

View File

@ -358,6 +358,8 @@ async def mailing_text_received(message: types.Message, state: FSMContext):
obj = message.audio
elif message.content_type == types.ContentType.VIDEO:
obj = message.video
if obj.file_size and obj.file_size > 4194304:
return await message.answer(_("Слишком большой файл (4 Мб максимум)"))
try:
await obj.download(buffer, timeout=5)
@ -366,10 +368,14 @@ async def mailing_text_received(message: types.Message, state: FSMContext):
logging.error(err, exc_info=True)
return await message.answer(_("Не удалось загрузить файл (слишком большой размер?)"))
proxy["mailing_data"] = buffer.getvalue()
proxy["mailing_file_name"] = getattr(obj, "file_name")
proxy["mailing_file_name"] = getattr(obj, "file_name", None)
_message_id = await send_stored_message(proxy, AioBot.get_current(), message.chat.id)
keyboard = types.InlineKeyboardMarkup(row_width=1)
keyboard.insert(
types.InlineKeyboardButton(text=_("<< Отменить рассылку"),
callback_data=menu_callback.new(level=1, bot_id=bot_id, operation=empty, chat=empty))
)
keyboard.insert(
types.InlineKeyboardButton(text=_("Да, начать рассылку"),
callback_data=menu_callback.new(level=3, bot_id=bot_id, operation="go_go_mailing",