toggle menu
Telegram Bot
7.5.0
common
switch theme
search in API
Telegram Bot
/
eu.vendeli.tgbot.types.internal
/
Response
/
Failure
Failure
@
Serializable
@
SerialName
(
value
=
"false"
)
data
class
Failure
(
val
errorCode
:
Int
,
val
description
:
String
?
=
null
,
val
parameters
:
ResponseParameters
?
=
null
)
:
Response
<
Nothing
>
Members
Members & Extensions
Constructors
Failure
Link copied to clipboard
constructor
(
errorCode
:
Int
,
description
:
String
?
=
null
,
parameters
:
ResponseParameters
?
=
null
)
Properties
description
Link copied to clipboard
val
description
:
String
?
=
null
error
Code
Link copied to clipboard
val
errorCode
:
Int
ok
Link copied to clipboard
val
ok
:
Boolean
parameters
Link copied to clipboard
val
parameters
:
ResponseParameters
?
=
null
Functions
get
Or
Null
Link copied to clipboard
fun
<
T
>
Response
<
T
>
.
getOrNull
(
)
:
T
?
Get response or null on failure.
is
Success
Link copied to clipboard
fun
<
T
>
Response
<
T
>
.
isSuccess
(
)
:
Boolean
Whether the request completed successfully.
on
Failure
Link copied to clipboard
inline
fun
<
T
>
Response
<
T
>
.
onFailure
(
block
:
(
Response.Failure
)
->
Unit
)
:
T
?