Skip to content

Commit ade18ee

Browse files
committed
update default device
1 parent 5531a3f commit ade18ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

service/bot/bot.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package bot
33
import (
44
"io/ioutil"
55
"os"
6+
"strings"
67
"time"
78

89
"github.com/Mrs4s/MiraiGo/client"
@@ -17,10 +18,14 @@ func InitDevice(path string) {
1718
if !util.PathExists(path) {
1819
log.Warn("虚拟设备信息不存在, 将自动生成随机设备.")
1920
client.GenRandomDevice()
21+
client.SystemDeviceInfo.Display = []byte(strings.Replace(string(client.SystemDeviceInfo.Display), "MIRAI", "GMC", -1))
22+
client.SystemDeviceInfo.FingerPrint = []byte(strings.Replace(string(client.SystemDeviceInfo.FingerPrint), "MIRAI", "GMC", -1))
23+
client.SystemDeviceInfo.FingerPrint = []byte(strings.Replace(string(client.SystemDeviceInfo.FingerPrint), "mirai", "gmc", -1))
24+
client.SystemDeviceInfo.FingerPrint = []byte(strings.Replace(string(client.SystemDeviceInfo.FingerPrint), "mamoe", "pbbot", -1))
2025
client.SystemDeviceInfo.Device = []byte("gmc")
2126
client.SystemDeviceInfo.Board = []byte("gmc")
2227
client.SystemDeviceInfo.Model = []byte("gmc")
23-
client.SystemDeviceInfo.Brand = []byte("protobufbot")
28+
client.SystemDeviceInfo.Brand = []byte("pbbot")
2429
client.SystemDeviceInfo.Product = []byte("gmc")
2530
_ = ioutil.WriteFile(path, client.SystemDeviceInfo.ToJson(), 0644)
2631
log.Infof("已生成设备信息并保存到 %s 文件.", path)

0 commit comments

Comments
 (0)