mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 21:01:14 +00:00
command, ws ping message fix
- remove commands (command CRUD, hook, alert) - ws ping message fix
This commit is contained in:
@@ -70,6 +70,10 @@ fun Routing.wsSongListRoutes() {
|
||||
for (frame in incoming) {
|
||||
when(frame) {
|
||||
is Frame.Text -> {
|
||||
if(frame.readText() == "ping") {
|
||||
send(Frame.Pong(frame.data))
|
||||
return@webSocket
|
||||
}
|
||||
val data = frame.readText().let { Json.decodeFromString<SongRequest>(it) }
|
||||
|
||||
if(data.maxQueue != null && data.maxQueue > 0) SongConfigService.updateQueueLimit(user, data.maxQueue)
|
||||
|
@@ -63,7 +63,10 @@ fun Routing.wsSongRoutes() {
|
||||
for (frame in incoming) {
|
||||
when(frame) {
|
||||
is Frame.Text -> {
|
||||
|
||||
if(frame.readText() == "ping") {
|
||||
send(Frame.Pong(frame.data))
|
||||
return@webSocket
|
||||
}
|
||||
}
|
||||
is Frame.Ping -> send(Frame.Pong(frame.data))
|
||||
else -> {
|
||||
|
@@ -63,7 +63,10 @@ fun Routing.wsTimerRoutes() {
|
||||
for (frame in incoming) {
|
||||
when(frame) {
|
||||
is Frame.Text -> {
|
||||
|
||||
if(frame.readText() == "ping") {
|
||||
send(Frame.Pong(frame.data))
|
||||
return@webSocket
|
||||
}
|
||||
}
|
||||
is Frame.Ping -> send(Frame.Pong(frame.data))
|
||||
else -> {
|
||||
|
Reference in New Issue
Block a user