Skip to content

Commit

Permalink
Add documentation for passing your own token (#19)
Browse files Browse the repository at this point in the history
* Clean up flags

* Add link to Twitch docs

* Change to ACCESS_TOKEN
  • Loading branch information
atye authored Jul 16, 2021
1 parent 75ea5a2 commit 723eabb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion internal/cmd/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 723eabb

Please sign in to comment.