mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 21:01:14 +00:00
fix somes.
- command renamed "!노래추가" to "!신청곡", and its debugged. - command "!노래시작" to user.discordId is null, send announce to chzzk chat. - songlist function isDisabled value added.
This commit is contained in:
@@ -36,6 +36,7 @@ data class GetSessionDTO(
|
||||
val maxQueueSize: Int,
|
||||
val maxUserSize: Int,
|
||||
val isStreamerOnly: Boolean,
|
||||
val isDisabled: Boolean
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -112,7 +113,8 @@ fun Routing.apiRoutes() {
|
||||
status.content!!.channel.channelImageUrl,
|
||||
songConfig.queueLimit,
|
||||
songConfig.personalLimit,
|
||||
songConfig.streamerOnly
|
||||
songConfig.streamerOnly,
|
||||
songConfig.disabled
|
||||
))
|
||||
}
|
||||
post {
|
||||
|
@@ -60,7 +60,7 @@ fun Routing.wsSongListRoutes() {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
))
|
||||
}
|
||||
removeSession(uid, this)
|
||||
@@ -75,6 +75,7 @@ fun Routing.wsSongListRoutes() {
|
||||
if(data.maxQueue != null && data.maxQueue > 0) SongConfigService.updateQueueLimit(user, data.maxQueue)
|
||||
if(data.maxUserLimit != null && data.maxUserLimit > 0) SongConfigService.updatePersonalLimit(user, data.maxUserLimit)
|
||||
if(data.isStreamerOnly != null) SongConfigService.updateStreamerOnly(user, data.isStreamerOnly)
|
||||
if(data.isDisabled != null) SongConfigService.updateDisabled(user, data.isDisabled)
|
||||
|
||||
if(data.type == SongType.ADD.value && data.url != null) {
|
||||
try {
|
||||
@@ -173,8 +174,6 @@ fun Routing.wsSongListRoutes() {
|
||||
CoroutineScope(Dispatchers.Default).launch {
|
||||
val user = UserService.getUser(it.uid)
|
||||
if(user != null) {
|
||||
val session = SongConfigService.getConfig(user)
|
||||
|
||||
sessions[user.token]?.forEach { ws ->
|
||||
ws.sendSerialized(
|
||||
SongResponse(
|
||||
@@ -203,5 +202,6 @@ data class SongRequest(
|
||||
val maxQueue: Int?,
|
||||
val maxUserLimit: Int?,
|
||||
val isStreamerOnly: Boolean?,
|
||||
val remove: Int?
|
||||
val remove: Int?,
|
||||
val isDisabled: Boolean?,
|
||||
)
|
Reference in New Issue
Block a user