mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-11-09 15:40:03 +00:00
Switch presence module to app-access-token
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b47bbdfd14
commit
5955de8a2a
2 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ func (m *modPresence) Initialize(id string, crontab *cron.Cron, discord *discord
|
||||||
"fallback_text",
|
"fallback_text",
|
||||||
"twitch_channel_id",
|
"twitch_channel_id",
|
||||||
"twitch_client_id",
|
"twitch_client_id",
|
||||||
"twitch_token",
|
"twitch_client_secret",
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return errors.Wrap(err, "validating attributes")
|
return errors.Wrap(err, "validating attributes")
|
||||||
}
|
}
|
||||||
|
@ -63,9 +63,9 @@ func (m modPresence) cronUpdatePresence() {
|
||||||
twitch := newTwitchAdapter(
|
twitch := newTwitchAdapter(
|
||||||
// @attr twitch_client_id required string "" Twitch client ID the token was issued for
|
// @attr twitch_client_id required string "" Twitch client ID the token was issued for
|
||||||
m.attrs.MustString("twitch_client_id", nil),
|
m.attrs.MustString("twitch_client_id", nil),
|
||||||
"", // No client secret used
|
// @attr twitch_client_secret required string "" Secret for the Twitch app identified with twitch_client_id
|
||||||
// @attr twitch_token required string "" Token for the user the `twitch_channel_id` belongs to
|
m.attrs.MustString("twitch_client_secret", nil),
|
||||||
m.attrs.MustString("twitch_token", nil),
|
"", // No User-Token used
|
||||||
)
|
)
|
||||||
|
|
||||||
data, err := twitch.GetChannelStreamSchedule(
|
data, err := twitch.GetChannelStreamSchedule(
|
||||||
|
|
|
@ -104,7 +104,7 @@ Updates the presence status of the bot to display the next stream
|
||||||
| `fallback_text` | ✅ | string | | What to set the text to when no stream is found (`playing <text>`) |
|
| `fallback_text` | ✅ | string | | What to set the text to when no stream is found (`playing <text>`) |
|
||||||
| `twitch_channel_id` | ✅ | string | | ID (not name) of the channel to fetch the schedule from |
|
| `twitch_channel_id` | ✅ | string | | ID (not name) of the channel to fetch the schedule from |
|
||||||
| `twitch_client_id` | ✅ | string | | Twitch client ID the token was issued for |
|
| `twitch_client_id` | ✅ | string | | Twitch client ID the token was issued for |
|
||||||
| `twitch_token` | ✅ | string | | Token for the user the `twitch_channel_id` belongs to |
|
| `twitch_client_secret` | ✅ | string | | Secret for the Twitch app identified with twitch_client_id |
|
||||||
| `cron` | | string | `* * * * *` | When to execute the module |
|
| `cron` | | string | `* * * * *` | When to execute the module |
|
||||||
| `schedule_past_time` | | duration | `15m` | How long in the past should the schedule contain an entry |
|
| `schedule_past_time` | | duration | `15m` | How long in the past should the schedule contain an entry |
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue