From 723eabb4af643d79a95eaa643179598bdf28fa07 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Fri, 16 Jul 2021 16:44:13 -0400 Subject: [PATCH] Add documentation for passing your own token (#19) * Clean up flags * Add link to Twitch docs * Change to ACCESS_TOKEN --- README.md | 7 ++++++- internal/cmd/entrypoint.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c24baec..fd1c601 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,11 @@ redirectPort: "8080" `ttchat` would listen on `http://localhost:8080` for Twitch's authentication result. So, your Twitch application must have `http://localhost:8080` for a redirect URL. # Running -`ttchat -h` +See `ttchat -h` for options and arguments `ttchat --channel ludwig` + +Obtaining an access token requires you to login via your default browswer. To provide your own token, use the `--token` flag. +See https://dev.twitch.tv/docs/authentication/getting-tokens-oauth for more details on obtaining your own access token. + +`ttchat -c ludwing --token $ACCESS_TOKEN` diff --git a/internal/cmd/entrypoint.go b/internal/cmd/entrypoint.go index 2a52f9a..c57c114 100644 --- a/internal/cmd/entrypoint.go +++ b/internal/cmd/entrypoint.go @@ -68,7 +68,7 @@ chat using a small configuration file. See repo for more details. ttchat -h ttchat --channel ludwig -ttchat --channel ludwig --lines 5 +ttchat -c ludwing --token $ACCESS_TOKEN `, Run: func(cmd *cobra.Command, args []string) { rand.Seed(time.Now().UTC().UnixNano())