qazxcdswe123 / telegrammemobot Goto Github PK
View Code? Open in Web Editor NEWA telegram bot for https://github.com/usememos/memos
A telegram bot for https://github.com/usememos/memos
个人自建了tg api的反代,希望可以将
api.telegram.org 换成自建的api 网址
如:
官方api:
https://api.telegram.org/bot这里是机器人TOKEN/sendMessage?chat_id=这里是ChatID&text=推送的内容
饭袋api:
https://telegram_proxy.lulafun.workers.dev/botXXXXXX/sendMessage?chat_id=XXXXXX&text=XXXXX
研究半天,创建了个机器人。后面不知道怎么进行了,能出个教程吗?
2023-01-28 14:07:51,944 - telegram.ext.updater - ERROR - Error while bootstrap del webhook: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /boxxxxxxxxxxxx:xxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx/deleteWebhook (Caused by ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9751bb01c0>, 'Connection to api.telegram.org timed out. (connect timeout=5.0)'))
2023-01-28 14:07:51,944 - telegram.ext.updater - WARNING - Failed bootstrap phase; try=8 max_retries=-1
使用docker启动,这两天发现向bot发送任何消息都返回 Error:
,vps上查看log显示以下内容:
2023-07-31 05:52:01,521 - root - ERROR - Error: in send_text_memo
2023-07-31 05:52:01,530 - root - ERROR - Error: in send_text_memo
2023-07-31 05:54:00,786 - root - ERROR - Error: in send_text_memo
当一条消息是包含了图片和文字时,似乎只会存储图片,消息的文字并不会显示。并且图片在资源库中是可以看到的,然后再主页看不到,包括第三方的安卓、苹果软件上。
可以考虑通过环境变量设置默认的标签,可见状态。方便将telegram的memos归类
如题,查看了源码,发现目前只支持单个tg用户
import os
id_list = []
id_str = os.environ.get('ID')
if id_str:
id_list = [int(x.strip()) for x in id_str.split(',')]
else:
pass
#if user id in list, then continue the context
希望可以修复一下。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.