grim/wasdead

Add a twitch client secret command line option
draft
2020-09-26, Gary Kramlich
1a9b917bc9ce
Parents 1cb0807a8bb9
Children c6d101eb5c05
Add a twitch client secret command line option
  • +5 -4
    run/run.go
  • --- a/run/run.go Sat Sep 26 04:15:03 2020 -0500
    +++ b/run/run.go Sat Sep 26 04:15:31 2020 -0500
    @@ -18,9 +18,10 @@
    )
    type RunCmd struct {
    - DiscordToken string `kong:"flag,name='discord-token',env='DISCORD_TOKEN',help='The bot token for discord',required"`
    - TwitchClientID string `kong:"flag,name='twitch-client-id',env='TWITCH_CLIENT_ID',help='The Twitch client ID',optional"`
    - YouTubeApiKey string `kong:"flag,name='youtube-api-key',env='YOUTUBE_API_KEY',help='The Youtube api key',optional"`
    + DiscordToken string `kong:"flag,name='discord-token',env='DISCORD_TOKEN',help='The bot token for discord',required"`
    + TwitchClientID string `kong:"flag,name='twitch-client-id',env='TWITCH_CLIENT_ID',help='The Twitch client ID',optional"`
    + TwitchClientSecret string `kong:"flag,name='twitch-client-secret',env='TWITCH_CLIENT_SECRET',help='The Twitch client secret',optional"`
    + YouTubeApiKey string `kong:"flag,name='youtube-api-key',env='YOUTUBE_API_KEY',help='The Youtube api key',optional"`
    }
    var (
    @@ -39,7 +40,7 @@
    defer database.Close()
    if len(r.TwitchClientID) > 0 {
    - provider, err := twitch.New(r.TwitchClientID)
    + provider, err := twitch.New(r.TwitchClientID, r.TwitchClientSecret)
    if err != nil {
    log.Panic(err)
    }