forked from assimon/captcha-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d34516
commit f392ca7
Showing
4 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
runtime/ | ||
.env | ||
dist/ | ||
config.toml | ||
config.*.toml | ||
db/geecaptcha.db | ||
captcha-bot | ||
dict/dec_* | ||
dict/dec_* | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#系统设置 | ||
[system] | ||
app_debbug=false | ||
join_hint_after_del_time=60 # 加群验证提示消息多久删除,秒 | ||
captcha_timeout=120 # 验证超时时间,秒 | ||
runtime_path="/runtime" # 缓存目录 | ||
|
||
#telegram 配置 | ||
[telegram] | ||
bot_token="" # 机器人apitoken | ||
api_proxy="" # telegram api代理,仅大陆地区服务器需要 | ||
manage_users=[] # 超级管理员userid数组,以英文逗号分割,例如123,456,789 | ||
|
||
#日志配置 | ||
[log] | ||
max_size=32 | ||
max_age=7 | ||
max_backups=3 | ||
|
||
#消息模板 | ||
[message] | ||
join_hint="欢迎 [%s](%s) 加入 %s\n ⚠️本群已开启新成员验证功能,未通过验证的用户无法发言 \n超时未完成验证会被移除本群! \n⏱本条消息 %d 秒后自动删除\n👇点击下方按钮自助解除禁言" | ||
captcha_image="欢迎您加入[%s]!\n⚠本群已开启新成员验证功能。\n👆为了证明您不是机器人,请发送以上图片验证码内容\n🤖机器人将自动验证您发送的验证码内容是否正确\n⏱本条验证消息有效期[%d]秒" | ||
verification_complete="恭喜您成功通过[🤖人机验证],系统已为您解除禁言限制。\n如若还是无法发言,请重启telegram客户端\n请同时注意群内发言规范,以防永久禁止" | ||
block_hint="\\#封禁预警\n[%s](%s) 请注意,您的消息中含有部分违禁词 \n⚠️您已被系统判断为高风险用户,已被封禁\n系统已向超管发送预警信息,若由超管判定为误杀,会及时将您解除封禁。\n您的违禁词包含:%s" | ||
|
||
#广告阻止 | ||
[adblock] | ||
number_of_forbidden_words=2 # 违禁词判定个数,如果一句话中出现的违禁词为该设置个数,则判断为违禁 | ||
block_time=-1 # 阻止时间,单位:秒。如果为-1,则代表永久封禁 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
|
||
"github.com/assimon/captcha-bot/bootstrap" | ||
) | ||
|
||
func main() { | ||
go func() { | ||
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { | ||
fmt.Fprintf(w, "OK") | ||
}) | ||
http.ListenAndServe(":8080", nil) | ||
}() | ||
|
||
bootstrap.Start() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters