This commit is contained in:
shoopea 2021-11-13 10:52:54 +08:00
parent 7bd6916eb8
commit bb1a7d0062
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
config.json
gottdad

2
bot.go
View File

@ -475,7 +475,7 @@ func botQuery(q *tb.Query) {
}
func botText(m *tb.Message) {
r := regexp.MustCompile("^/delete_(?<Ref>[a-f0-9]{16})$")
r := regexp.MustCompile("^/delete_(?P<Ref>[a-f0-9]{16})$")
if r.MatchString(m.Text) {
ref := r.ReplaceAllString(m.Text, "${Ref}")
d, ok := companyDeleteMap[ref]