update models/bot.go.
新增提交沃邮箱参数
This commit is contained in:
parent
ff71cb9570
commit
11dda8e33f
@ -90,6 +90,20 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
}
|
||||
switch msg {
|
||||
default:
|
||||
{ //沃邮箱
|
||||
ss := regexp.MustCompile(`https://nyan.mail.*3D`).FindStringSubmatch(msg)
|
||||
if len(ss) > 0 {
|
||||
var u User
|
||||
if db.Where("number = ?", sender.UserID).First(&u).Error != nil {
|
||||
return 0
|
||||
}
|
||||
db.Model(u).Updates(map[string]interface{}{
|
||||
"womail": ss[0],
|
||||
})
|
||||
sender.Reply(fmt.Sprintf("沃邮箱提交成功!"))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
{
|
||||
if strings.Contains(msg, "wskey=") {
|
||||
rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, msg), &Sender{})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user