more rebasing
This commit is contained in:
parent
e05bd9fe9c
commit
f0d9a037c1
@ -3,19 +3,19 @@
|
|||||||
*/
|
*/
|
||||||
package dev.jansel.feixiao
|
package dev.jansel.feixiao
|
||||||
|
|
||||||
|
import com.github.philippheuer.events4j.reactor.ReactorEventHandler
|
||||||
import com.github.twitch4j.TwitchClient
|
import com.github.twitch4j.TwitchClient
|
||||||
import com.github.twitch4j.TwitchClientBuilder
|
import com.github.twitch4j.TwitchClientBuilder
|
||||||
import com.github.twitch4j.events.ChannelGoLiveEvent
|
import com.github.twitch4j.events.ChannelGoLiveEvent
|
||||||
import dev.jansel.feixiao.database.collections.StreamerCollection
|
import dev.jansel.feixiao.database.collections.StreamerCollection
|
||||||
import dev.jansel.feixiao.extensions.EventHooks
|
import dev.jansel.feixiao.extensions.EventHooks
|
||||||
import dev.jansel.feixiao.extensions.StreamerCommand
|
import dev.jansel.feixiao.extensions.StreamerCommand
|
||||||
import dev.jansel.feixiao.utils.*
|
import dev.jansel.feixiao.utils.database
|
||||||
import dev.kord.core.entity.channel.GuildMessageChannel
|
import dev.jansel.feixiao.utils.token
|
||||||
import dev.kordex.core.ExtensibleBot
|
import dev.kordex.core.ExtensibleBot
|
||||||
import dev.kordex.core.i18n.SupportedLocales
|
import dev.kordex.core.i18n.SupportedLocales
|
||||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import kotlinx.coroutines.launch
|
import dev.jansel.feixiao.utils.twitch
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
|
|
||||||
var twitchClient: TwitchClient? = null
|
var twitchClient: TwitchClient? = null
|
||||||
val logger = KotlinLogging.logger { }
|
val logger = KotlinLogging.logger { }
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package dev.jansel.feixiao.utils
|
package dev.jansel.feixiao.utils
|
||||||
|
|
||||||
|
import com.github.philippheuer.events4j.reactor.ReactorEventHandler
|
||||||
import com.github.twitch4j.TwitchClientBuilder
|
import com.github.twitch4j.TwitchClientBuilder
|
||||||
import com.github.twitch4j.events.ChannelGoLiveEvent
|
import com.github.twitch4j.events.ChannelGoLiveEvent
|
||||||
import dev.jansel.feixiao.botRef
|
import dev.jansel.feixiao.botRef
|
||||||
@ -14,6 +15,7 @@ class Twitch : KordExKoinComponent {
|
|||||||
suspend fun init() {
|
suspend fun init() {
|
||||||
twitchClient = TwitchClientBuilder.builder()
|
twitchClient = TwitchClientBuilder.builder()
|
||||||
.withEnableHelix(true)
|
.withEnableHelix(true)
|
||||||
|
.withDefaultEventHandler(ReactorEventHandler::class.java)
|
||||||
.withClientId(twitchcid)
|
.withClientId(twitchcid)
|
||||||
.withClientSecret(twitchcs)
|
.withClientSecret(twitchcs)
|
||||||
.build()
|
.build()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user