Documentation ¶
Index ¶
- Variables
- func AddWhitelist(name string) error
- func Close() error
- func GetLevel(QQ int64) (level int64, err error)
- func GetWhitelistByQQ(QQ int64) (id uuid.UUID, err error)
- func GetWhitelistByUUID(ID uuid.UUID) (qq int64, err error)
- func Init(dir string) error
- func RCONCmd(cmd string, ret func(string)) error
- func RemoveWhitelist(name string) error
- func SetLevel(QQ, level int64) (err error)
- func SetWhitelist(QQ int64, ID uuid.UUID, onOldID func(oldID uuid.UUID) error, ...) (owner int64, err error)
- func UnsetWhitelist(QQ int64, onHas func(ID uuid.UUID) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AppDir string
AppDir 当前插件数据目录
View Source
var Config struct { // 游戏群 GroupID int64 // 管理群 AdminID int64 // 管理员 Administrators []int64 // 处理进群请求 DealWithGroupRequest struct { Enable bool CanReject bool CheckURL string Token string } // 数据库配置 Database struct { Driver string Source string } // MC服务器远程控制台 RCON struct { Address string Password string } // Ping工具配置 Ping struct { DefaultServer string Timeout duration } // 自定义命令 Cmd map[string]struct { Level int64 // 所需权限 Command string // 指令本身 Silent bool // 是否不回显 AllowArgs bool // 是否允许使用参数 } }
Functions ¶
func GetWhitelistByQQ ¶
GetWhitelistByQQ 从数据库读取玩家绑定的ID,若没有绑定ID则返回uuid.Nil
func GetWhitelistByUUID ¶
GetWhitelistByUUID 从数据库读取绑定ID的玩家,若ID没有被绑定则则返回0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.