init: workspace opencode sync
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
import requests, json
|
||||
|
||||
r = requests.get('https://api.telegram.org/bot5115036608:AAGeyXVq5eNvdAkaCQHU9NfH16uAAiSKiuk/getUpdates?offset=-10')
|
||||
d = r.json()
|
||||
msgs = [m for m in d.get('result',[]) if 'message' in m]
|
||||
print(f"Total messages: {len(msgs)}")
|
||||
for m in msgs[-5:]:
|
||||
cid = m['message']['chat']['id']
|
||||
txt = m['message'].get('text','')[:150]
|
||||
print(f" chat={cid} text={txt}")
|
||||
Reference in New Issue
Block a user