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
}
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) {
bot.SendChat(m.Chat.ID, "Wrong format.")