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