This commit is contained in:
parent
948494a9fb
commit
51e864d0c9
@ -1,5 +1,6 @@
|
||||
package dev.jansel.aglaea.utils
|
||||
|
||||
import com.github.philippheuer.credentialmanager.domain.OAuth2Credential
|
||||
import com.github.twitch4j.TwitchClientBuilder
|
||||
import com.github.twitch4j.chat.events.channel.ChannelMessageEvent
|
||||
import dev.jansel.aglaea.logger
|
||||
@ -10,6 +11,8 @@ class Twitch : KordExKoinComponent {
|
||||
suspend fun init() {
|
||||
twitchClient = TwitchClientBuilder.builder()
|
||||
.withEnableHelix(true)
|
||||
.withEnableChat(true)
|
||||
.withChatAccount(OAuth2Credential("twitch", twitchToken))
|
||||
.withClientId(twitchcid)
|
||||
.withClientSecret(twitchcs)
|
||||
.build()
|
||||
|
@ -8,6 +8,7 @@ import org.koin.dsl.bind
|
||||
|
||||
val twitchcid = env("TWITCH_CLIENT_ID")
|
||||
val twitchcs = env("TWITCH_CLIENT_SECRET")
|
||||
val twitchToken = env("TWITCH_OAUTH_TOKEN")
|
||||
|
||||
suspend inline fun ExtensibleBotBuilder.twitch(active: Boolean) {
|
||||
hooks {
|
||||
|
Loading…
x
Reference in New Issue
Block a user