mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
Mark twitch-token flag / envvar deprecated
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
eac3b0ea34
commit
2bec4f82ed
2 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,7 @@ type (
|
||||||
TwitchClient string
|
TwitchClient string
|
||||||
TwitchClientSecret string
|
TwitchClientSecret string
|
||||||
|
|
||||||
FallbackToken string
|
FallbackToken string // DEPRECATED
|
||||||
|
|
||||||
TokenUpdateHook func()
|
TokenUpdateHook func()
|
||||||
}
|
}
|
||||||
|
|
6
main.go
6
main.go
|
@ -51,7 +51,7 @@ var (
|
||||||
StorageEncryptionPass string `flag:"storage-encryption-pass" default:"" description:"Passphrase to encrypt secrets inside storage (defaults to twitch-client:twitch-client-secret)"`
|
StorageEncryptionPass string `flag:"storage-encryption-pass" default:"" description:"Passphrase to encrypt secrets inside storage (defaults to twitch-client:twitch-client-secret)"`
|
||||||
TwitchClient string `flag:"twitch-client" default:"" description:"Client ID to act as"`
|
TwitchClient string `flag:"twitch-client" default:"" description:"Client ID to act as"`
|
||||||
TwitchClientSecret string `flag:"twitch-client-secret" default:"" description:"Secret for the Client ID"`
|
TwitchClientSecret string `flag:"twitch-client-secret" default:"" description:"Secret for the Client ID"`
|
||||||
TwitchToken string `flag:"twitch-token" default:"" description:"OAuth token valid for client (fallback if no token was set in interface)"`
|
TwitchToken string `flag:"twitch-token" default:"" description:"OAuth token valid for client (fallback if no token was set in interface) -- DEPRECATED"`
|
||||||
ValidateConfig bool `flag:"validate-config,v" default:"false" description:"Loads the config, logs any errors and quits with status 0 on success"`
|
ValidateConfig bool `flag:"validate-config,v" default:"false" description:"Loads the config, logs any errors and quits with status 0 on success"`
|
||||||
VersionAndExit bool `flag:"version" default:"false" description:"Prints current version and exits"`
|
VersionAndExit bool `flag:"version" default:"false" description:"Prints current version and exits"`
|
||||||
WaitForSelfcheck time.Duration `flag:"wait-for-selfcheck" default:"60s" description:"Maximum time to wait for the self-check to respond when behind load-balancers"`
|
WaitForSelfcheck time.Duration `flag:"wait-for-selfcheck" default:"60s" description:"Maximum time to wait for the self-check to respond when behind load-balancers"`
|
||||||
|
@ -113,6 +113,10 @@ func initApp() error {
|
||||||
}, ":")
|
}, ":")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.TwitchToken != "" {
|
||||||
|
log.Warn("You are using the DEPRECATED --twitch-token flag / TWITCH_TOKEN env variable, please switch to web-based auth! - This flag will be removed in a later release!")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue