some improve WSApis

- with WSSongListRoutes.kt, data receive logics.
- else WSAPI's logger name changed.
- MessageHandler.kt "!노래시작" command improved.
This commit is contained in:
dalbodeule
2024-08-05 13:25:28 +09:00
parent 0a4e8193bb
commit cc23ac03e7
4 changed files with 40 additions and 30 deletions

View File

@@ -263,13 +263,13 @@ class MessageHandler(
SongConfigService.updateSession(user, session, password)
bot.getUserById(user.token)?.let { it ->
val channel = it.openPrivateChannel()
channel.onSuccess { privateChannel ->
privateChannel.sendMessage("여기로 접속해주세요! https://nabot,mori.space/songlist/${session}.\n인증번호는 ||$password|| 입니다.").queue()
bot.retrieveUserById(user.discord).queue { discordUser ->
discordUser?.openPrivateChannel()?.queue { channel ->
channel.sendMessage("여기로 접속해주세요! https://nabot,mori.space/songlist/${session}.\n인증번호는 ||$password|| 입니다.")
.queue()
}
}
}
internal fun handle(msg: ChatMessage, user: User) {