@Nullable open static fun <T : IMentionable!> resolveEntity(@NotNull input: @NotNull String, @NotNull type: @NotNull MentionType, @NotNull idResolver: @NotNull Function<@NotNull String, @Nullable T?>, @NotNull nameResolver: @NotNull BiFunction<@NotNull String, Boolean!, @NotNull MutableCollection<T>>): @Nullable T?
Resolves an mentionable
entity by a mention, it's id or it's name (case-sensitive).
input
- String: e.g an user input that should get parsed for mentions
type
- MentionType: the net.dv8tion.jda.api.entities.Message.MentionType
of the expected entity
idResolver
- Function<String, T?>: a Function
that can resolve that type of entity by its id
nameResolver
- BiFunction<String, Boolean!, MutableCollection<T>>: a Function
that can resolve that type of entity by its name
Return
T?: the entity or null
if there was no entity found for that input
@Nullable open static fun <T : IMentionable!> resolveEntity(@NotNull input: @NotNull String, @NotNull type: @NotNull MentionType, @NotNull idResolver: @NotNull Function<@NotNull String, @Nullable T?>, @NotNull nameResolver: @NotNull BiFunction<@NotNull String, Boolean!, @NotNull MutableCollection<T>>, ignoreCase: Boolean): @Nullable T?
Resolves an mentionable
entity by a mention, it's id or it's name.
input
- String: e.g an user input that should get parsed for mentions
type
- MentionType: the net.dv8tion.jda.api.entities.Message.MentionType
of the expected entity
idResolver
- Function<String, T?>: a Function
that can resolve that type of entity by its id
nameResolver
- BiFunction<String, Boolean!, MutableCollection<T>>: a Function
that can resolve that type of entity by its name
ignoreCase
- Boolean: Whether the name should be resolved case-sensitive or not
Return
T?: the entity or null
if there was no entity found for that input