diff options
| author | MadrinX <rahian1379@gmail.com> | 2024-10-17 11:59:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-17 11:59:42 +0300 |
| commit | f1f813269c1c7814c36c6b7482367a4d1c696beb (patch) | |
| tree | 9880ea828a26750cb0ffe8637c6249d482a8e986 /web/service/setting.go | |
| parent | a23f3904026f5a3f0094ca37047752f28552c35e (diff) | |
feat(tgbot): Add the option to change the telegram API server (#2584)
Diffstat (limited to 'web/service/setting.go')
| -rw-r--r-- | web/service/setting.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/service/setting.go b/web/service/setting.go index 90bf8fc4..bbdac81d 100644 --- a/web/service/setting.go +++ b/web/service/setting.go @@ -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") } |
