Небольшое изменение Discord уведомление
This commit is contained in:
@@ -332,7 +332,7 @@ def check_discord_public():
|
|||||||
list_for_public = []
|
list_for_public = []
|
||||||
|
|
||||||
for topic_id, topic_title in list_titles_and_ids:
|
for topic_id, topic_title in list_titles_and_ids:
|
||||||
if topic_title not in discord_messages and topic_id > 693:
|
if topic_title not in discord_messages and topic_id > 698:
|
||||||
list_for_public.append((topic_id, topic_title))
|
list_for_public.append((topic_id, topic_title))
|
||||||
|
|
||||||
if not list_for_public:
|
if not list_for_public:
|
||||||
@@ -349,7 +349,7 @@ def check_discord_public():
|
|||||||
for topic_id, topic_title in reversed(list_for_public):
|
for topic_id, topic_title in reversed(list_for_public):
|
||||||
text_data = news_content(topic_id)
|
text_data = news_content(topic_id)
|
||||||
if text_data:
|
if text_data:
|
||||||
content = f"----------------------------------------------------------\n### {topic_title}\t\n" + text_data + "\n"
|
content = f"----------------------------------------------------------\n### {topic_title}\t\n" + text_data + "\n" + "@here"
|
||||||
# Разбиваем содержимое на части по 4000 символов
|
# Разбиваем содержимое на части по 4000 символов
|
||||||
for i in range(0, len(content), 2000):
|
for i in range(0, len(content), 2000):
|
||||||
await channel.send(content[i:i+2000])
|
await channel.send(content[i:i+2000])
|
||||||
@@ -435,7 +435,7 @@ def check_vk_posts():
|
|||||||
logging.info(f"Новостей для публикации в ВК нет")
|
logging.info(f"Новостей для публикации в ВК нет")
|
||||||
else:
|
else:
|
||||||
for topic_id, topic_title in reversed(list_for_public):
|
for topic_id, topic_title in reversed(list_for_public):
|
||||||
if topic_id > 693:
|
if topic_id > 698:
|
||||||
logging.info(f"Новости для публикации в ВК: {list_for_public}")
|
logging.info(f"Новости для публикации в ВК: {list_for_public}")
|
||||||
text_data = news_content(topic_id)
|
text_data = news_content(topic_id)
|
||||||
if text_data:
|
if text_data:
|
||||||
|
Reference in New Issue
Block a user