mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
以入参形式指定superusers避免反复编译
This commit is contained in:
parent
b82e0aeb2e
commit
b1b831ff87
@ -3,4 +3,6 @@ mips-linux-musl-gcc -v
|
||||
go env -w GOPROXY=https://goproxy.cn,direct
|
||||
go env -w GO111MODULE=auto
|
||||
go mod tidy
|
||||
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 CC=mips-linux-musl-gcc CXX=mips-linux-musl-g++ go build -ldflags "-s -w" -o zerobot
|
||||
export CCBIN=~/openwrt_with_lean_packages/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-musl-gcc
|
||||
export CXXBIN=~/openwrt_with_lean_packages/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-musl-g++
|
||||
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 CC=${CCBIN} CXX=${CXXBIN} go build -ldflags "-s -w" -o zerobot
|
||||
3
main.go
3
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
easy "github.com/t-tomalak/logrus-easy-formatter"
|
||||
@ -47,7 +48,7 @@ func main() {
|
||||
zero.Run(zero.Config{
|
||||
NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"},
|
||||
CommandPrefix: "/",
|
||||
SuperUsers: []string{"825111790", "213864964"}, // 必须修改,否则无权限
|
||||
SuperUsers: os.Args[1:], // 必须修改,否则无权限
|
||||
Driver: []zero.Driver{
|
||||
driver.NewWebSocketClient("127.0.0.1", "6700", ""),
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user