command / me.schlaubi.regnumutils.common.parsing / EntityResolver / resolveUser

resolveUser

@Nullable open static fun resolveUser(@NotNull input: @NotNull String, @NotNull jda: @NotNull JDA): @Nullable User?

Resolves an User entity by a mention, it's id or it's name (case-sensitive).

Parameters

input - String: e.g an user input that should get parsed for mentions

jda - JDA: the JDA instance of you bot

Return
User?: the entity or null if there was no entity found for that input

@Nullable open static fun resolveUser(@NotNull input: @NotNull String, @NotNull jda: @NotNull JDA, ignoreCase: Boolean): @Nullable User?

Resolves an TextChannel entity by a mention, it's id or it's name.

Parameters

input - String: e.g an user input that should get parsed for mentions

jda - JDA: the JDA instance of you bot

ignoreCase - Boolean: Whether the name should be resolved case-sensitive or not

Return
User?: the entity or null if there was no entity found for that input