mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
return on filter file does not exist refactor: event filter 将event filter独立出来 refact: rate limit 将限速改成连接独立控制 switch to yaml config
30 lines
646 B
Go
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
|
|
}
|
|
*/
|