add ping command, chzzk Connector.kt

This commit is contained in:
dalbodeule
2024-06-12 19:52:58 +09:00
parent 315a61aecf
commit 294bf04a50
9 changed files with 148 additions and 15 deletions

View 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)
}