CI: Support topic

This commit is contained in:
omg-xtao 2022-11-06 22:40:23 +08:00 committed by GitHub
parent 8625dd596f
commit 0bd62162aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,8 @@ text = (
url = f'https://api.telegram.org/bot{token}/sendMessage' url = f'https://api.telegram.org/bot{token}/sendMessage'
for cid in ['-1001441461877', '-1001319957857']: for cid in ['-1001441461877', '-1001319957857']:
push_content = {'chat_id': cid, 'disable_web_page_preview': 'True', 'parse_mode': 'markdown', 'text': text} push_content = {'chat_id': cid, 'disable_web_page_preview': 'True', 'parse_mode': 'markdown', 'text': text}
if cid == '-1001441461877':
push_content['message_thread_id'] = 1027828
with contextlib.suppress(Exception): with contextlib.suppress(Exception):
main_req = post(url, data=push_content) main_req = post(url, data=push_content)
time.sleep(1) time.sleep(1)