1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00
go-cqhttp/global/config.go
wdvxdr 3ea9c2547c
switch to yaml config(#770)
return on filter file does not exist

refactor: event filter
将event filter独立出来

refact: rate limit
将限速改成连接独立控制

switch to yaml config
2021-04-04 22:46:54 +08:00

30 lines
646 B
Go

package global
var AccountToken []byte
// PasswordHash 存储QQ密码哈希供登录使用
var PasswordHash [16]byte
/*
// GetCurrentPath 预留,获取当前目录地址
func GetCurrentPath() (string, error) {
file, err := exec.LookPath(os.Args[0])
if err != nil {
return "", err
}
fpath, err := filepath.Abs(file)
if err != nil {
return "", err
}
if runtime.GOOS == "windows" {
// fpath = strings.Replace(fpath, "\\", "/", -1)
fpath = strings.ReplaceAll(fpath, "\\", "/")
}
i := strings.LastIndex(fpath, "/")
if i < 0 {
return "", errors.New("system/path_error,Can't find '/' or '\\'")
}
return fpath[0 : i+1], nil
}
*/