feat: support other api endpoint

This commit is contained in:
Vaala Cat
2023-06-08 22:28:41 +08:00
parent e516a51ebe
commit 730aea3e3b
2 changed files with 6 additions and 2 deletions

View File

@@ -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,
}
}