fix take regexp

This commit is contained in:
shoopea 2021-11-13 10:45:18 +08:00
parent aa2a229ad2
commit d4a7d2fd82
2 changed files with 5 additions and 5 deletions

2
bot.go
View File

@ -267,7 +267,7 @@ func botTake(m *tb.Message) {
return return
} }
r := regexp.MustCompile("^/give @(?P<Username>[a-zA-Z0-9]+) (?P<Duration>[a-z0-9]+)") r := regexp.MustCompile("^/take @(?P<Username>[a-zA-Z0-9]+) (?P<Duration>[a-z0-9]+)")
if !r.MatchString(m.Text) { if !r.MatchString(m.Text) {
bot.SendChat(m.Chat.ID, "Wrong format.") bot.SendChat(m.Chat.ID, "Wrong format.")

View File

@ -1,6 +1,6 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "24bf4dc" var githash = "aa2a229"
var buildstamp = "2021-11-13_02:40:31" var buildstamp = "2021-11-13_02:45:07"
var commits = "189" var commits = "190"
var version = "24bf4dc-b189 - 2021-11-13_02:40:31" var version = "aa2a229-b190 - 2021-11-13_02:45:07"