fix take regexp
This commit is contained in:
2
bot.go
2
bot.go
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user