Compare commits
4 Commits
7810f3b7b9
...
2387823151
Author | SHA1 | Date | |
---|---|---|---|
2387823151 | |||
88f8bb4a52 | |||
cf6c1f03d7 | |||
0a309a9f59 |
@@ -7,11 +7,13 @@
|
|||||||
"forwards": "Check post forwards",
|
"forwards": "Check post forwards",
|
||||||
"import": "Submit .zip archive with photos",
|
"import": "Submit .zip archive with photos",
|
||||||
"export": "Get .zip archive with all photos",
|
"export": "Get .zip archive with all photos",
|
||||||
|
"remove": "Delete photo by its ID",
|
||||||
|
"purge": "Completely purge bot's queue",
|
||||||
"reboot": "Restart the bot"
|
"reboot": "Restart the bot"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"start": "Hi and welcome!\n\nYou can submit your pictures and videos here. We'll review and add them, if we like them. Make sure you send your stuff one at a time and have chosen media that corresponds to our rules.\n\nYou can also write something to us in the description field. We'll send it with the submission itself, if needed.\n\nAlso, make sure you follow the /rules of submission, otherwise your submission will be declined. In case of spam/abuse you may even be blocked.\n\nHave fun and happy submitting!",
|
"start": "Hi and welcome!\n\nYou can submit your pictures and videos here. We'll review and add them, if we like them. Make sure you send your stuff one at a time and have chosen media that corresponds to our rules.\n\nYou can also write something to us in the description field. We'll send it with the submission itself, if needed.\n\nAlso, make sure you follow the /rules of submission, otherwise your submission will be declined. In case of spam/abuse you may even be blocked.\n\nHave fun and happy submitting!",
|
||||||
"rules": "Photos submission rules:\n1. No porn, only erotics and aesthetics\n2. Nipples are semi-allowed, should be either veiled or barely visible\n3. Genitalia strictly prohibited, but labia prints on clothes or nice pubes/panties/butts - are fine",
|
"rules": "Photos submission rules:\n1. No porn, only erotics and aesthetics\n2. Nipples are semi-allowed, should be either veiled or barely visible\n3. Genitalia strictly prohibited, but labia prints on clothes or nice pubes/panties/butts - are fine\n4. Submitting russians is forbidden",
|
||||||
"shutdown": "Shutting down bot with pid `{0}`",
|
"shutdown": "Shutting down bot with pid `{0}`",
|
||||||
"startup": "Starting with pid `{0}`",
|
"startup": "Starting with pid `{0}`",
|
||||||
"sub_yes": "✅ Submission approved and accepted",
|
"sub_yes": "✅ Submission approved and accepted",
|
||||||
@@ -29,11 +31,11 @@
|
|||||||
"document_too_large": "File you've sent is too large. Please submit files not bigger than {0} MB",
|
"document_too_large": "File you've sent is too large. Please submit files not bigger than {0} MB",
|
||||||
"mime_not_allowed": "File type not allowed. Please, consider using one of these: {0}",
|
"mime_not_allowed": "File type not allowed. Please, consider using one of these: {0}",
|
||||||
"post_exception": "Could not send content due to `{0}`\n\nTraceback:\n```{1}```",
|
"post_exception": "Could not send content due to `{0}`\n\nTraceback:\n```{1}```",
|
||||||
"post_invalid_pic": "__TO_BE_ADDED__",
|
"post_invalid_pic": "⚠️ Error {0} while sending photo\n```python\n{1}\n```",
|
||||||
"api_queue_empty": "Could not send content: `Queue is empty or contains only unsupported files.`",
|
"api_queue_empty": "Could not send content: `Queue is empty or contains only unsupported files.`",
|
||||||
"api_queue_error": "__TO_BE_ADDED__",
|
"api_queue_error": "Could not get photo from API's queue. Check the log above or API's errors to get more info.",
|
||||||
"post_low": "Low amount of content: `There are only {0} files left in the queue.`",
|
"post_low": "Low amount of content: `There are only {0} files left in the queue.`",
|
||||||
"api_creds_invalid": "__TO_BE_ADDED__",
|
"api_creds_invalid": "Could not authorize API access. Please check whether provided in config file are valid and update them if they're not.",
|
||||||
"sub_wip": "Post submission is now WIP. It will be available again in a few days. Thank you for your patience.",
|
"sub_wip": "Post submission is now WIP. It will be available again in a few days. Thank you for your patience.",
|
||||||
"sub_duplicates_found": "__TO_BE_ADDED__",
|
"sub_duplicates_found": "__TO_BE_ADDED__",
|
||||||
"sub_error": "⚠️ Could not upload this image due to bot error. Admins are advised.",
|
"sub_error": "⚠️ Could not upload this image due to bot error. Admins are advised.",
|
||||||
@@ -58,7 +60,7 @@
|
|||||||
"sub_media_unavail": "Could not download submission",
|
"sub_media_unavail": "Could not download submission",
|
||||||
"sub_done": "You've already decided what to do with submission",
|
"sub_done": "You've already decided what to do with submission",
|
||||||
"sub_upload_failed": "__TO_BE_ADDED__",
|
"sub_upload_failed": "__TO_BE_ADDED__",
|
||||||
"sub_duplicates_found": "__TO_BE_ADDED__",
|
"sub_duplicates_found": "There're duplicates in bot's database",
|
||||||
"nothing": "🏁 This action is already finished"
|
"nothing": "🏁 This action is already finished"
|
||||||
},
|
},
|
||||||
"console": {
|
"console": {
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
"exception_occured": "Exception {0} happened on task execution",
|
"exception_occured": "Exception {0} happened on task execution",
|
||||||
"post_sent": "Sent {0} to {1} with caption {2} and silently {3}",
|
"post_sent": "Sent {0} to {1} with caption {2} and silently {3}",
|
||||||
"post_exception": "Could not send content due to {0}. Traceback: {1}",
|
"post_exception": "Could not send content due to {0}. Traceback: {1}",
|
||||||
"post_invalid_pic": "__TO_BE_ADDED__",
|
"post_invalid_pic": "Error while sending photo HTTP {0}: {1}",
|
||||||
"post_empty": "Could not send content due to queue empty or contains only forbidden extensions",
|
"post_empty": "Could not send content due to queue empty or contains only forbidden extensions",
|
||||||
"sub_mime_not_allowed": "Got submission from {0} but type of {1} which is not allowed",
|
"sub_mime_not_allowed": "Got submission from {0} but type of {1} which is not allowed",
|
||||||
"sub_document_too_large": "Got submission from {0} but but file is too large ({1} > {2})",
|
"sub_document_too_large": "Got submission from {0} but but file is too large ({1} > {2})",
|
||||||
|
@@ -7,11 +7,13 @@
|
|||||||
"forwards": "Переглянути репости",
|
"forwards": "Переглянути репости",
|
||||||
"import": "Надати боту .zip архів з фотографіями",
|
"import": "Надати боту .zip архів з фотографіями",
|
||||||
"export": "Отримати .zip архів з усіма фотографіями",
|
"export": "Отримати .zip архів з усіма фотографіями",
|
||||||
|
"remove": "Видалити фото за його ID",
|
||||||
|
"purge": "Повністю видалити всю чергу бота",
|
||||||
"reboot": "Перезапустити бота"
|
"reboot": "Перезапустити бота"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"start": "Привіт і ласкаво просимо!\n\nТут можна пропонувати свої фотографії та відео. Ми переглянемо та додамо їх, якщо вони нам сподобаються. Переконайтеся, що ви надсилаєте свої матеріали по одному та вибираєте медіа, які відповідають нашим правилам.\n\nВи також можете написати нам щось у полі опису. За потреби ми надішлемо це разом із самим фото.\n\nКрім того, переконайтеся, що ви дотримуєтеся /rules (правил) подання, інакше вашу пропозицію буде відхилено. У разі спаму/зловживань вас можуть навіть заблокувати.\n\nГарного дня та щасливого надсилання!",
|
"start": "Привіт і ласкаво просимо!\n\nТут можна пропонувати свої фотографії та відео. Ми переглянемо та додамо їх, якщо вони нам сподобаються. Переконайтеся, що ви надсилаєте свої матеріали по одному та вибираєте медіа, які відповідають нашим правилам.\n\nВи також можете написати нам щось у полі опису. За потреби ми надішлемо це разом із самим фото.\n\nКрім того, переконайтеся, що ви дотримуєтеся /rules (правил) подання, інакше вашу пропозицію буде відхилено. У разі спаму/зловживань вас можуть навіть заблокувати.\n\nГарного дня та щасливого надсилання!",
|
||||||
"rules": "Правила пропонування фото:\n1. Ніякого порно, тільки еротика та естетика\n2. Соски можна, але або завуальовані, або зовсім ледь помітні\n3. Геніталії суворо ні, а ось відбитки статевих губ на одязі або гарні лобочки/трусики/попки - без проблем",
|
"rules": "Правила пропонування фото:\n1. Ніякого порно, тільки еротика та естетика\n2. Соски можна, але або завуальовані, або зовсім ледь помітні\n3. Геніталії суворо ні, а ось відбитки статевих губ на одязі або гарні лобочки/трусики/попки - без проблем\n4. Пропонувати русню заборонено",
|
||||||
"shutdown": "Вимкнення бота з підом `{0}`",
|
"shutdown": "Вимкнення бота з підом `{0}`",
|
||||||
"startup": "Запуск бота з підом `{0}`",
|
"startup": "Запуск бота з підом `{0}`",
|
||||||
"sub_yes": "✅ Подання схвалено та прийнято",
|
"sub_yes": "✅ Подання схвалено та прийнято",
|
||||||
@@ -29,11 +31,11 @@
|
|||||||
"document_too_large": "Надісланий файл завеликий. Будь ласка, надсилайте файли не більше {0} Мб",
|
"document_too_large": "Надісланий файл завеликий. Будь ласка, надсилайте файли не більше {0} Мб",
|
||||||
"mime_not_allowed": "Тип файлу не дозволений. Розгляньте можливість використання одного з цих: {0}",
|
"mime_not_allowed": "Тип файлу не дозволений. Розгляньте можливість використання одного з цих: {0}",
|
||||||
"post_exception": "Не вдалося надіслати контент через `{0}`\n\nTraceback:\n```{1}```",
|
"post_exception": "Не вдалося надіслати контент через `{0}`\n\nTraceback:\n```{1}```",
|
||||||
"post_invalid_pic": "__TO_BE_ADDED__",
|
"post_invalid_pic": "⚠️ Помилка надсилання фото {0}\n```python\n{1}\n```",
|
||||||
"api_queue_empty": "Не вдалося надіслати контент: `Черга порожня або містить лише непідтримувані файли`.",
|
"api_queue_empty": "Не вдалося надіслати контент: `Черга порожня або містить лише непідтримувані файли`.",
|
||||||
"api_queue_error": "__TO_BE_ADDED__",
|
"api_queue_error": "Не вдалось отримати фото з черги API. Погляньте на логи вище а також на лог помилок API щоб дізнатись подробиці.",
|
||||||
"post_low": "Мала кількість контенту: `Залишилось всього {0} файлів в черзі.`",
|
"post_low": "Мала кількість контенту: `Залишилось всього {0} файлів в черзі.`",
|
||||||
"api_creds_invalid": "__TO_BE_ADDED__",
|
"api_creds_invalid": "Не вдалося авторизувати запит до API. Будь ласка, перевірте чи дані авторизації в конфігураційному файлі вірні та оновіть їх, якщо це не так.",
|
||||||
"sub_wip": "Подання постів зараз знаходиться у розробці. Він буде знову доступний через кілька днів. Дякуємо за ваше терпіння.",
|
"sub_wip": "Подання постів зараз знаходиться у розробці. Він буде знову доступний через кілька днів. Дякуємо за ваше терпіння.",
|
||||||
"sub_duplicates_found": "__TO_BE_ADDED__",
|
"sub_duplicates_found": "__TO_BE_ADDED__",
|
||||||
"sub_error": "⚠️ Не вдалось завантажити фото через помилку бота. Адміністрацію повідомлено.",
|
"sub_error": "⚠️ Не вдалось завантажити фото через помилку бота. Адміністрацію повідомлено.",
|
||||||
@@ -58,7 +60,7 @@
|
|||||||
"sub_media_unavail": "Не вдалося завантажити подання",
|
"sub_media_unavail": "Не вдалося завантажити подання",
|
||||||
"sub_done": "Ви вже обрали що зробити з цим поданням",
|
"sub_done": "Ви вже обрали що зробити з цим поданням",
|
||||||
"sub_upload_failed": "__TO_BE_ADDED__",
|
"sub_upload_failed": "__TO_BE_ADDED__",
|
||||||
"sub_duplicates_found": "__TO_BE_ADDED__",
|
"sub_duplicates_found": "Знайдено дублікати в базі даних бота",
|
||||||
"nothing": "🏁 Цю дію вже було завершено"
|
"nothing": "🏁 Цю дію вже було завершено"
|
||||||
},
|
},
|
||||||
"console": {
|
"console": {
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
"exception_occured": "Помилка {0} сталась під час виконання",
|
"exception_occured": "Помилка {0} сталась під час виконання",
|
||||||
"post_sent": "Надіслано {0} у {1} з підписом {2} та без звуку {3}",
|
"post_sent": "Надіслано {0} у {1} з підписом {2} та без звуку {3}",
|
||||||
"post_exception": "Не вдалося надіслати контент через {0}. Traceback: {1}",
|
"post_exception": "Не вдалося надіслати контент через {0}. Traceback: {1}",
|
||||||
"post_invalid_pic": "__TO_BE_ADDED__",
|
"post_invalid_pic": "Помилка надсилання фото HTTP {0}: {1}",
|
||||||
"post_empty": "Не вдалося надіслати контент адже черга з дозволеними розширеннями порожня",
|
"post_empty": "Не вдалося надіслати контент адже черга з дозволеними розширеннями порожня",
|
||||||
"sub_mime_not_allowed": "Отримано подання від {0} але типу {1} який не є дозволеним",
|
"sub_mime_not_allowed": "Отримано подання від {0} але типу {1} який не є дозволеним",
|
||||||
"sub_document_too_large": "Отримано подання від {0} але файл завеликий({1} > {2})",
|
"sub_document_too_large": "Отримано подання від {0} але файл завеликий({1} > {2})",
|
||||||
|
@@ -39,9 +39,9 @@ async def send_content(app: PosterClient) -> None:
|
|||||||
response = get(f'{configGet("address", "posting", "api")}/photos/{pic[0]}', headers={"Authorization": f"Bearer {token}"}, stream=True)
|
response = get(f'{configGet("address", "posting", "api")}/photos/{pic[0]}', headers={"Authorization": f"Bearer {token}"}, stream=True)
|
||||||
|
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
logWrite(locale("post_invalid_pic", "console", locale=configGet("locale")).format(str(response.json())))
|
logWrite(locale("post_invalid_pic", "console", locale=configGet("locale")).format(response.status_code, str(response.json())))
|
||||||
if configGet("error", "reports"):
|
if configGet("error", "reports"):
|
||||||
await app.send_message(app.owner, locale("post_invalid_pic", "message", locale=configGet("locale")).format(response.json()))
|
await app.send_message(app.owner, locale("post_invalid_pic", "message", locale=configGet("locale")).format(response.status_code, response.json()))
|
||||||
|
|
||||||
tmp_dir = str(uuid4())
|
tmp_dir = str(uuid4())
|
||||||
|
|
||||||
|
@@ -15,5 +15,19 @@ async def cmd_import(app: PosterClient, msg: Message):
|
|||||||
@app.on_message(~ filters.scheduled & filters.command(["export"], prefixes=["", "/"]))
|
@app.on_message(~ filters.scheduled & filters.command(["export"], prefixes=["", "/"]))
|
||||||
async def cmd_export(app: PosterClient, msg: Message):
|
async def cmd_export(app: PosterClient, msg: Message):
|
||||||
|
|
||||||
|
if msg.from_user.id in app.admins:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@app.on_message(~ filters.scheduled & filters.command(["remove"], prefixes=["", "/"]))
|
||||||
|
async def cmd_remove(app: PosterClient, msg: Message):
|
||||||
|
|
||||||
|
if msg.from_user.id in app.admins:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@app.on_message(~ filters.scheduled & filters.command(["purge"], prefixes=["", "/"]))
|
||||||
|
async def cmd_purge(app: PosterClient, msg: Message):
|
||||||
|
|
||||||
if msg.from_user.id in app.admins:
|
if msg.from_user.id in app.admins:
|
||||||
pass
|
pass
|
@@ -149,7 +149,7 @@ async def get_submission(app: PosterClient, msg: Message):
|
|||||||
if msg.from_user.id in app.admins and configGet("admins", "submission", "require_confirmation") is False:
|
if msg.from_user.id in app.admins and configGet("admins", "submission", "require_confirmation") is False:
|
||||||
try:
|
try:
|
||||||
await app.submit_photo(str(inserted.inserted_id))
|
await app.submit_photo(str(inserted.inserted_id))
|
||||||
await msg.reply_text(locale("sub_yes_auto", "message", locale=user_locale), quote=True)
|
await msg.reply_text(locale("sub_yes_auto", "message", locale=user_locale), disable_notification=True, quote=True)
|
||||||
await msg.copy(app.owner, caption=caption, disable_notification=True)
|
await msg.copy(app.owner, caption=caption, disable_notification=True)
|
||||||
return
|
return
|
||||||
except SubmissionDuplicatesError as exp:
|
except SubmissionDuplicatesError as exp:
|
||||||
@@ -161,7 +161,7 @@ async def get_submission(app: PosterClient, msg: Message):
|
|||||||
elif msg.from_user.id not in app.admins and configGet("users", "submission", "require_confirmation") is False:
|
elif msg.from_user.id not in app.admins and configGet("users", "submission", "require_confirmation") is False:
|
||||||
try:
|
try:
|
||||||
await app.submit_photo(str(inserted.inserted_id))
|
await app.submit_photo(str(inserted.inserted_id))
|
||||||
await msg.reply_text(locale("sub_yes_auto", "message", locale=user_locale), quote=True)
|
await msg.reply_text(locale("sub_yes_auto", "message", locale=user_locale), disable_notification=True, quote=True)
|
||||||
await msg.copy(app.owner, caption=caption)
|
await msg.copy(app.owner, caption=caption)
|
||||||
return
|
return
|
||||||
except SubmissionDuplicatesError as exp:
|
except SubmissionDuplicatesError as exp:
|
||||||
@@ -182,7 +182,7 @@ async def get_submission(app: PosterClient, msg: Message):
|
|||||||
PosterUser(msg.from_user.id).limit()
|
PosterUser(msg.from_user.id).limit()
|
||||||
|
|
||||||
if msg.from_user.id != app.owner:
|
if msg.from_user.id != app.owner:
|
||||||
await msg.reply_text(locale("sub_sent", "message", locale=user_locale), quote=True)
|
await msg.reply_text(locale("sub_sent", "message", locale=user_locale), disable_notification=True, quote=True)
|
||||||
|
|
||||||
await msg.copy(app.owner, caption=caption, reply_markup=InlineKeyboardMarkup(buttons))
|
await msg.copy(app.owner, caption=caption, reply_markup=InlineKeyboardMarkup(buttons))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user