update
This commit is contained in:
@@ -81,8 +81,10 @@ func AddCommand(prefix string, cmds []Function) {
|
||||
func handleMessage(sender Sender) {
|
||||
defer sender.Finish()
|
||||
key := fmt.Sprintf("u=%v&c=%v&i=%v", sender.GetUserID(), sender.GetChatID(), sender.GetImType())
|
||||
fmt.Println(key)
|
||||
if v, ok := waits.Load(key); ok {
|
||||
c := v.(Carry)
|
||||
fmt.Println(c, "-----")
|
||||
if m := regexp.MustCompile(c.Pattern).FindString(sender.GetContent()); m != "" {
|
||||
c.Chan <- m
|
||||
sender.Reply(<-c.Result)
|
||||
|
||||
Reference in New Issue
Block a user