feat: support other api endpoint
This commit is contained in:
@@ -14,6 +14,7 @@ type botSettings struct {
|
||||
MCServer string
|
||||
MCBotName string
|
||||
GroupID int64
|
||||
TGBotApi string
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -27,8 +28,9 @@ func init() {
|
||||
mc_server := os.Getenv("MC_SERVER")
|
||||
mc_bot_name := os.Getenv("MC_BOT_NAME")
|
||||
group_id_str := os.Getenv("GROUP_ID")
|
||||
tg_bot_api := os.Getenv("TG_BOT_API")
|
||||
|
||||
if http_proxy == "" || bot_token == "" || mc_server == "" || mc_bot_name == "" || group_id_str == "" {
|
||||
if http_proxy == "" || bot_token == "" || mc_server == "" || mc_bot_name == "" || group_id_str == "" || tg_bot_api == "" {
|
||||
logrus.Panic("请检查环境变量是否设置正确")
|
||||
}
|
||||
|
||||
@@ -43,6 +45,7 @@ func init() {
|
||||
MCServer: mc_server,
|
||||
MCBotName: mc_bot_name,
|
||||
GroupID: group_id,
|
||||
TGBotApi: tg_bot_api,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user