update
This commit is contained in:
+21
-9
@@ -36,16 +36,18 @@ var R Replace
|
|||||||
var N Notify
|
var N Notify
|
||||||
|
|
||||||
type Faker struct {
|
type Faker struct {
|
||||||
Message interface{}
|
Message string
|
||||||
matches [][]string
|
matches [][]string
|
||||||
|
Type string
|
||||||
|
UserID int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetContent() string {
|
func (sender *Faker) GetContent() string {
|
||||||
return ""
|
return sender.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetUserID() int {
|
func (sender *Faker) GetUserID() int {
|
||||||
return 0
|
return sender.UserID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetChatID() int {
|
func (sender *Faker) GetChatID() int {
|
||||||
@@ -53,7 +55,7 @@ func (sender *Faker) GetChatID() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetImType() string {
|
func (sender *Faker) GetImType() string {
|
||||||
return ""
|
return sender.Type
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetMessageID() int {
|
func (sender *Faker) GetMessageID() int {
|
||||||
@@ -73,27 +75,37 @@ func (sender *Faker) GetReplySenderUserID() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetRawMessage() interface{} {
|
func (sender *Faker) GetRawMessage() interface{} {
|
||||||
return nil
|
return sender.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) SetMatch(ss []string) {
|
func (sender *Faker) SetMatch(ss []string) {
|
||||||
|
sender.matches = [][]string{ss}
|
||||||
}
|
}
|
||||||
func (sender *Faker) SetAllMatch(ss [][]string) {
|
func (sender *Faker) SetAllMatch(ss [][]string) {
|
||||||
|
sender.matches = ss
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetMatch() []string {
|
func (sender *Faker) GetMatch() []string {
|
||||||
return nil
|
return sender.matches[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) GetAllMatch() [][]string {
|
func (sender *Faker) GetAllMatch() [][]string {
|
||||||
return nil
|
return sender.matches
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sender *Faker) Get(index ...int) string {
|
func (sender *Faker) Get(index ...int) string {
|
||||||
|
i := 0
|
||||||
|
if len(index) != 0 {
|
||||||
|
i = index[0]
|
||||||
|
}
|
||||||
|
if len(sender.matches) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
if len(sender.matches[0]) < i+1 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return sender.matches[0][i]
|
||||||
|
}
|
||||||
|
|
||||||
func (sender *Faker) IsAdmin() bool {
|
func (sender *Faker) IsAdmin() bool {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user