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

EntityResolver

open class EntityResolver

Useful tool to parse a text-message for EntityResolvable.

Constructors

<init>

EntityResolver()

Useful tool to parse a text-message for EntityResolvable.

Functions

resolveEntity

open static fun <T : IMentionable!> resolveEntity(input: String, type: MentionType, idResolver: Function<String, T?>, nameResolver: BiFunction<String, Boolean!, MutableCollection<T>>): T?

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

open static fun <T : IMentionable!> resolveEntity(input: String, type: MentionType, idResolver: Function<String, T?>, nameResolver: BiFunction<String, Boolean!, MutableCollection<T>>, ignoreCase: Boolean): T?

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

resolveMember

open static fun resolveMember(input: String, guild: Guild): Member?

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

open static fun resolveMember(input: String, guild: Guild, ignoreCase: Boolean): Member?

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

resolveRole

open static fun resolveRole(input: String, guild: Guild): Role?

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

open static fun resolveRole(input: String, guild: Guild, ignoreCase: Boolean): Role?

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

resolveTextChannel

open static fun resolveTextChannel(input: String, guild: Guild): TextChannel?

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

open static fun resolveTextChannel(input: String, guild: Guild, ignoreCase: Boolean): TextChannel?

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

resolveUser

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

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

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

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