iyear / e5subbot Goto Github PK
View Code? Open in Web Editor NEW🤖 Telebot for E5 Renewal
Home Page: https://t.me/E5Sub_bot
License: GNU General Public License v3.0
🤖 Telebot for E5 Renewal
Home Page: https://t.me/E5Sub_bot
License: GNU General Public License v3.0
首先用pdf配置并绑定成功但是执行错误,使用自动配置并绑定成功但是执行错误, 都是相同的错误
您的帐户 xx 在执行时出现了错误
您可以选择解绑该用户
错误: {"code":"MailboxNotEnabledForRESTAPI","message":"The mailbox is either inactive, soft-deleted, or is hosted on-premise.","innerError":{"date":"2023-01-05T03:01:23","request-id":"xxx","client-request-id":"xxx"}}
Docker部署,版本0.4.0
errlimit: 被设置为-1时应该为忽略错误,不主动清退;但实际疑似会清退所有注册的账户?
(我只绑了一个,admin 敲 /task 后结果为 1/1 成功->错误账户为空,但被清退,改errlimit为999并重启后恢复正常)
提供配置项自动跟随系统代理作为Bot代理
输入 ./E5SubBot
报错如下
[root@Linux]# ./E5SubBot
2020/06/07 15:20:54 While parsing config: yaml: line 22: mapping values are not allowed in this context
ERROR
panic: While parsing config: yaml: line 22: mapping values are not allowed in this context
goroutine 1 [running]:
main.CheckErr(0xa3efa0, 0xc00010c760, 0xc00010c760)
E:/GoProjects/E5SubBot/main/util.go:26 +0x101
main.init.0()
E:/GoProjects/E5SubBot/main/handle.go:54 +0xb5
配置文件如下:
#bindmax,notice,admin,errlimit可热更新,直接更新config.yml保存即可
##更换为自己的BotToken
bot_token: 10219xxxx1:AAGfUFn3SnERpxFTzAxxxxxxx
##不需要socks5代理删去即可
socks5: 127.0.0.1:1080
##公告,合并至/help
notice: "第一行\n第二行"
##管理员tgid,前往https://t.me/userinfobot获取,用,隔开
##管理员权限: 手动调用任务,获得任务总反馈
admin: 991535xxx1
##任务最大出错次数,满后自动解绑账户并发送通知,无限次数将值改为负数(-1)即可
##以ms账户为单位,不会解绑所有账户(只解绑错误账户)
##主要为了减少资源浪费.bot重启后会清零所有错误次数
errlimit: 5
##API调用频率,使用cron表达式
cron: "1 */3 * * *"
##最大可绑定数
bindmax: 3 ##mysql配置,请提前创建数据库
mysql:
host: 127.0.0.1
port: 3306
user: e5sub
password: e5sub
database: e5sub
我用的最新版的二进制文件(linux),在arm64平台上无法运行。希望能增加各个平台的二进制文件(虽然能编译吧)
然后我根据README上的教程编译后,用go build main.go
,报错:
# command-line-arguments ./main.go:50:23: undefined: bStart ./main.go:51:20: undefined: bMy ./main.go:52:22: undefined: bBind1 ./main.go:53:24: undefined: bUnBind ./main.go:54:24: undefined: bExport ./main.go:55:22: undefined: bHelp ./main.go:56:24: undefined: bOnText ./main.go:58:22: undefined: bTask ./main.go:59:21: undefined: bLog ./main.go:64:40: undefined: SignTask ./main.go:64:40: too many errors
我在网上搜了一下,好像用go build *.go
就可以通过go语言编译了,希望能在readme里能改正一下(我不懂go语言,如有出错望指正)
Dear developer, I am Yuan Zhou, a product manager in Azure identity team. We found that your app is using deeplink to apps.dev.microsoft.com to register applications with the Microsoft Identity Platform. This is not an official API and we want to notify you that we are deprecating this method in 30 days. You can use official Azure API to create applications instead. Please don't hesitate to reach out to me if you have any questions. Thanks!
您好,按照步骤5:
授权后会跳转至http://localhost/e5sub…… (会提示网页错误,复制链接即可)
发送client_id(空格)client_secret后打开授权连接,登录后没有跳转而是显示错误页面,没有对应的http://localhost/e5sub?code=**
Application registrations portal has been deprecated for registering and managing converged applications since May 2019 and this functionality will be removed starting July 2022. We recommend that you manage your existing applications and register new applications by using the App registrations (now Generally Available) experience in the Azure portal. Go to the Azure portal
meun菜单怎么添加?
如题,有这个需求主要原因是装了watchtower这个镜像可以自动升级已经装的docker镜像,但是如果是复制文件到镜像内的话升级后需要重新复制配置文件进去,而挂载目录方式加载的配置文件不用重新配置。感谢
直接在命令行执行,跑不起来,提示“【E5Sub】2021/05/10 13:30:25 main.go:132: http.Post failed: Post https://api.telegram.org/bot1878110893:AAEP57mATZAicmlCyUoCl4yQ2H5qyVinUj0/getMe: dial tcp 108.160.165.147:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.”,但是我把报错里面的那个网址复制出来在浏览器粘贴,能访问,显示“{"ok":true,"result":{"id":1878110893,"is_bot":true,"first_name":"E5_BA7JCM_TEST","username":"ba7jcm_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false}}”
完整运行日志我输出到这个txt里了:
1.txt
您好,可否增加一个特权模式,只响应 admin 参数中用户发来的消息,因为自建打算只给自己使用
AADSTS500113: No reply address is registered for the application.
stdout: ______ _____ _____ _ ____ _
stdout: | | / | | | | _ \ | |
stdout: | | | || ( _ | |_ | |) | ___ | |
stdout: | | | \ | | | | ' | _ < / _ | |
stdout: | | ) |) | || | |) | |) | () | |_
stdout: ||// _,|_./|____/ __/ __|
stdout:
stdout: 【E5Sub】2022/06/14 23:14:35 main.go:76: Read Config……
stdout: 【E5Sub】2022/06/14 23:14:35 main.go:94: Connect MySQL Success!
stdout: 【E5Sub】2022/06/14 23:14:35 main.go:96: dial tcp :0: connect: connection refused
大部分情况下,我认为一个小工具不需要和MySQL
捆绑,使用轻量级的Sqlite
会更好,如果担心对C库的依赖也可以考虑使用json
来储存数据
Hello
目前的yml是把mysql映射到主機3306 port上
因此主機是public IP的話 有很大的機會受到攻擊
可以把ports(L5-L6)刪掉, 只要config的host是使用mysql容器名稱連接就不會有問題
Lines 3 to 14 in 9cf10dc
1.机器人查看账户信息的时候能否显示所有日志?或者把日志log在服务器里
2.tg里显示的调用时间好像不是北京时间
3.建议调用间隔改成随机,太规律容易被发现
heroku可以每个月使用550h的docker(不绑卡)
按照文档回复了重新定向地址与别名,但是Bot回复wrong token type。主账号和同域账号都不行
今天上线发现自动解绑了 又绑定了下 发现一执行就解绑了 除了e5之外都正常 望修
目前任务使用 cron 设置循环运行频率,但运行时间固定易导致续订失败。建议支持其他的计划任务方式,或者支持修改 cron 表达式后实际执行的命令。
当用户在微软控制台手动禁用bot时 bot发送请求会返回以下日志:
{"L":"ERROR","T":"2021-07-07T02:57:58.269Z","C":"bots/sender.go:76","M":"failed to send msg","error":"api error: bot was blocked by the user (401)","id":"xxxxxxxxxxx"}
但是此异常并未进入bot的失败列表,多次失败无法成功解绑。
Sent from PPHub
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.