toggle menu
BotCommands
JVM
switch theme
search in API
BotCommands
/
io.github.freya022.botcommands.api.core.service
/
ServiceContainer
/
tryGetService
try
Get
Service
abstract
fun
<
T
:
Any
>
tryGetService
(
name
:
String
,
requiredType
:
KClass
<
T
>
)
:
ServiceResult
<
T
>
(
source
)
open
fun
<
T
:
Any
>
tryGetService
(
name
:
String
,
requiredType
:
Class
<
T
>
)
:
ServiceResult
<
T
>
(
source
)
abstract
fun
<
T
:
Any
>
tryGetService
(
clazz
:
KClass
<
T
>
)
:
ServiceResult
<
T
>
(
source
)
open
fun
<
T
:
Any
>
tryGetService
(
clazz
:
Class
<
T
>
)
:
ServiceResult
<
T
>
(
source
)