Join Slack
Powered by
<https://github.com/OtakuSenpai/AghoraBot/blob/mas...
# ktor
o
otakusenpai
05/27/2018, 12:38 PM
https://github.com/OtakuSenpai/AghoraBot/blob/master/src/main/kotlin/com/otakusenpai/aghora/connection/BasicConnection.kt#L103
This function call fails for a certain message due to null being sent by the server. How can I navigate the null being given out and return a normal "" or empty string ans the return parameter?
otakusenpai
05/27/2018, 12:51 PM
val foo = input.readASCIILine() data = if(foo == null) "" else foo as String if(data == null) { data = "" } This is what I tried so far. But it doesnt work.
h
hoang
05/27/2018, 2:55 PM
are you sure you want to put your password right on main 😜
d
Deactivated User
05/28/2018, 2:09 AM
What about
input.readASCIILine() ?: “”
?
5
Views
Open in Slack
Previous
Next