feat(tgbot): Add the option to change the telegram API server (#2584)

This commit is contained in:
MadrinX
2024-10-17 12:29:42 +03:30
committed by GitHub
parent a23f390402
commit f1f813269c
16 changed files with 73 additions and 19 deletions

View File

@@ -41,6 +41,7 @@ var defaultValueMap = map[string]string{
"tgBotEnable": "false",
"tgBotToken": "",
"tgBotProxy": "",
"tgBotAPIServer": "",
"tgBotChatId": "",
"tgRunTime": "@daily",
"tgBotBackup": "false",
@@ -262,6 +263,14 @@ func (s *SettingService) SetTgBotProxy(token string) error {
return s.setString("tgBotProxy", token)
}
func (s *SettingService) GetTgBotAPIServer() (string, error) {
return s.getString("tgBotAPIServer")
}
func (s *SettingService) SetTgBotAPIServer(token string) error {
return s.setString("tgBotAPIServer", token)
}
func (s *SettingService) GetTgBotChatId() (string, error) {
return s.getString("tgBotChatId")
}