This commit is contained in:
cdle
2021-10-06 14:58:32 +08:00
parent aac41a7a1a
commit bc0b4fe6bd
5 changed files with 4 additions and 34 deletions
-5
View File
@@ -19,7 +19,6 @@ type Sender interface {
GetAllMatch() [][]string
Get(...int) string
GetContent() string
GetUserName() string
IsAdmin() bool
IsMedia() bool
Reply(...interface{}) (int, error)
@@ -156,10 +155,6 @@ func (sender *Faker) Finish() {
}
func (sender *Faker) GetUserName() string {
return ""
}
func (sender *Faker) Continue() {
}
+3 -3
View File
@@ -146,8 +146,8 @@ func init() {
v, _ := otto.ToValue(s.Get(int(i - 1)))
return v
}
GetUserName := func() otto.Value {
v, _ := otto.ToValue(s.GetUserName())
GetUsername := func() otto.Value {
v, _ := otto.ToValue(s.GetUsername())
return v
}
Continue := func() {
@@ -155,7 +155,7 @@ func init() {
}
vm := otto.New()
vm.Set("Continue", Continue)
vm.Set("GetUserName", GetUserName)
vm.Set("GetUsername", GetUsername)
vm.Set("set", set)
vm.Set("param", param)
vm.Set("get", get)