mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
以入参形式指定superusers避免反复编译
This commit is contained in:
parent
36e338e9dd
commit
e2c5905d0a
@ -3,4 +3,6 @@ mips-linux-musl-gcc -v
|
|||||||
go env -w GOPROXY=https://goproxy.cn,direct
|
go env -w GOPROXY=https://goproxy.cn,direct
|
||||||
go env -w GO111MODULE=auto
|
go env -w GO111MODULE=auto
|
||||||
go mod tidy
|
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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
easy "github.com/t-tomalak/logrus-easy-formatter"
|
easy "github.com/t-tomalak/logrus-easy-formatter"
|
||||||
@ -47,7 +48,7 @@ func main() {
|
|||||||
zero.Run(zero.Config{
|
zero.Run(zero.Config{
|
||||||
NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"},
|
NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"},
|
||||||
CommandPrefix: "/",
|
CommandPrefix: "/",
|
||||||
SuperUsers: []string{"825111790", "213864964"}, // 必须修改,否则无权限
|
SuperUsers: os.Args[1:], // 必须修改,否则无权限
|
||||||
Driver: []zero.Driver{
|
Driver: []zero.Driver{
|
||||||
driver.NewWebSocketClient("127.0.0.1", "6700", ""),
|
driver.NewWebSocketClient("127.0.0.1", "6700", ""),
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user