test
This commit is contained in:
parent
0ea4664d3f
commit
8facf6ec85
5
bot.go
5
bot.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
@ -200,10 +201,10 @@ func botMsgExportAll(m *tb.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
d := &tb.Document{File: tb.FromReader(bytes.NewReader(b))}
|
d := tb.Document{File: tb.FromReader(bytes.NewReader(b))}
|
||||||
|
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
Type: commandReplyFile,
|
Type: commandReplyDocument,
|
||||||
Document: d,
|
Document: d,
|
||||||
FromMsgID64: int64(m.ID),
|
FromMsgID64: int64(m.ID),
|
||||||
FromChatID64: m.Chat.ID,
|
FromChatID64: m.Chat.ID,
|
||||||
|
4
def.go
4
def.go
@ -244,8 +244,8 @@ const (
|
|||||||
commandSendMsg = 3
|
commandSendMsg = 3
|
||||||
commandDeleteMsg = 4
|
commandDeleteMsg = 4
|
||||||
commandRefreshMsg = 5
|
commandRefreshMsg = 5
|
||||||
commandSendDoc = 6
|
commandSendDocument = 6
|
||||||
commandReplyDoc = 7
|
commandReplyDocument = 7
|
||||||
|
|
||||||
objTypeUser = 1
|
objTypeUser = 1
|
||||||
objTypeGuild = 2
|
objTypeGuild = 2
|
||||||
|
2
msg.go
2
msg.go
@ -280,7 +280,7 @@ func zipMessages() ([]byte, error) {
|
|||||||
m, err := getMsg(id)
|
m, err := getMsg(id)
|
||||||
logOnError(err, "zipMessages : getMsg")
|
logOnError(err, "zipMessages : getMsg")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
append(bkp.Messages, m)
|
append(bkp.Messages, *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b, err := json.Marshal(bkp)
|
b, err := json.Marshal(bkp)
|
||||||
|
Loading…
Reference in New Issue
Block a user