mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-08 05:11:12 +00:00
add ping command, chzzk Connector.kt
This commit is contained in:
14
src/main/kotlin/space/mori/chzzk_bot/chzzk/Connector.kt
Normal file
14
src/main/kotlin/space/mori/chzzk_bot/chzzk/Connector.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package space.mori.chzzk_bot.chzzk
|
||||
|
||||
import io.github.cdimascio.dotenv.dotenv
|
||||
import xyz.r2turntrue.chzzk4j.Chzzk
|
||||
import xyz.r2turntrue.chzzk4j.ChzzkBuilder
|
||||
|
||||
object Connector {
|
||||
private val dotenv = dotenv()
|
||||
val chzzk: Chzzk = ChzzkBuilder()
|
||||
.withAuthorization(dotenv["NID_AUT"], dotenv["NID_SES"])
|
||||
.build()
|
||||
|
||||
fun getChannel(channelId: String) = chzzk.getChannel(channelId)
|
||||
}
|
Reference in New Issue
Block a user