This commit is contained in:
shoopea 2019-05-02 23:18:24 +08:00
parent 9c6215f324
commit 488eada53b

View File

@ -431,7 +431,7 @@ func ListenGuild(c *tdlib.Client) {
fmt.Println("===============================================================================================================")
for _, line := range strings.Split(strings.TrimSuffix(txt, "\n"), "\n") {
validID := regexp.MustCompile(`^!g_stock$`)
validID := regexp.MustCompile(`^/g_stock$`)
if validID.MatchString(line) {
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GUILD STOCK REPORT SPOTTED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
@ -657,11 +657,11 @@ func ListenGuild(c *tdlib.Client) {
break
}
validID = regexp.MustCompile(`^!g_withdraw ([a-z0-9]+) ([0-9]+)$`)
validID = regexp.MustCompile(`^/g_withdraw ([a-z0-9]+) ([0-9]+)$`)
if validID.MatchString(line) {
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GUILD WITHDRAWAL SPOTTED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
t := regexp.MustCompile(`!g_withdraw (?P<Code>[a-z0-9]+) (?P<Quantity>[0-9]+)`)
t := regexp.MustCompile(`/g_withdraw (?P<Code>[a-z0-9]+) (?P<Quantity>[0-9]+)`)
if t.FindStringSubmatch(line) != nil {
size, _ = strconv.Atoi(t.ReplaceAllString(line, "${Quantity}"))