Package-level declarations

Types

Link copied to clipboard
class AttachmentConverter(var validator: Validator<Attachment> = null) : SingleConverter<Attachment>

Argument converter for Discord attachments.

Link copied to clipboard
class BooleanConverter(var validator: Validator<Boolean> = null) : SingleConverter<Boolean>

Argument converter for Boolean arguments.

Link copied to clipboard
class ChannelConverter(requireSameGuild: Boolean = true, requiredGuild: suspend () -> Snowflake? = null, requiredChannelTypes: Set<ChannelType> = setOf(), var validator: Validator<Channel> = null) : SingleConverter<Channel>

Argument converter for Discord Channel arguments.

Link copied to clipboard
class ColorConverter(var validator: Validator<Color> = null) : SingleConverter<Color>

Argument converter for colours, converting them into Color objects.

Link copied to clipboard
class DecimalConverter(val maxValue: Double? = null, val minValue: Double? = null, var validator: Validator<Double> = null) : SingleConverter<Double>

Argument converter for decimal arguments, converting them into Double.

Link copied to clipboard
class DurationCoalescingConverter(val longHelp: Boolean = true, val positiveOnly: Boolean = true, shouldThrow: Boolean = false, var validator: Validator<DateTimePeriod> = null) : CoalescingConverter<DateTimePeriod>

Argument converter for Kotlin DateTimePeriod arguments. You can apply these to an Instant using plus and a timezone.

Link copied to clipboard
class DurationConverter(val longHelp: Boolean = true, val positiveOnly: Boolean = true, var validator: Validator<DateTimePeriod> = null) : SingleConverter<DateTimePeriod>

Argument converter for Kotlin DateTimePeriod arguments. You can apply these to an Instant using plus and a timezone. Also accepts discord-formatted timestamps, in which case the DateTimePeriod will be the time until the timestamp.

Link copied to clipboard
class EmailConverter(var validator: Validator<String> = null) : SingleConverter<String>

Argument converter for email address arguments.

Link copied to clipboard
class EmojiConverter(var validator: Validator<Emoji> = null) : SingleConverter<Emoji>

Argument converter for Emoji arguments.

Link copied to clipboard
class EnumConverter<E : Enum<E>>(typeName: Key, getter: suspend (String, Locale) -> E?, var validator: Validator<E> = null) : SingleConverter<E>

Argument converter for arbitrary enum arguments.

Link copied to clipboard
data class FormattedTimestamp(val instant: Instant, val format: TimestampType)

Container class for a timestamp and format, as expected by Discord.

Link copied to clipboard
class GuildConverter(var validator: Validator<Guild> = null) : SingleConverter<Guild>

Argument converter for Discord Guild arguments.

Link copied to clipboard
class IntConverter(radix: Int = DEFAULT_RADIX, val maxValue: Int? = null, val minValue: Int? = null, var validator: Validator<Int> = null) : SingleConverter<Int>

Argument converter for integer arguments, converting them into Int.

Link copied to clipboard
class LongConverter(radix: Int = DEFAULT_RADIX, val maxValue: Long? = null, val minValue: Long? = null, var validator: Validator<Long> = null) : SingleConverter<Long>

Argument converter for long arguments, converting them into Long.

Link copied to clipboard
class MemberConverter(requiredGuild: suspend () -> Snowflake? = null, useReply: Boolean = true, requireSameGuild: Boolean = true, var validator: Validator<Member> = null) : SingleConverter<Member>

Argument converter for discord Member arguments.

Link copied to clipboard
class MessageConverter(requireGuild: Boolean = false, requiredGuild: suspend () -> Snowflake? = null, useReply: Boolean = true, var validator: Validator<Message> = null) : SingleConverter<Message>

Argument converter for discord Message arguments.

Link copied to clipboard
class RegexCoalescingConverter(options: Set<RegexOption> = setOf(), shouldThrow: Boolean = false, var validator: Validator<Regex> = null) : CoalescingConverter<Regex>

Coalescing argument converter for regular expression arguments, combining the arguments into a single Regex object by joining them with spaces.

Link copied to clipboard
class RegexConverter(options: Set<RegexOption> = setOf(), var validator: Validator<Regex> = null) : SingleConverter<Regex>

Argument converter for regular expression arguments, converting them into Regex objects.

Link copied to clipboard
class RoleConverter(requiredGuild: suspend () -> Snowflake? = null, var validator: Validator<Role> = null) : SingleConverter<Role>

Argument converter for discord Role arguments.

Link copied to clipboard
class SerializedConverter<T : Any>(typeName: Key, val serializer: KSerializer<T>, var validator: Validator<T> = null) : SingleConverter<T>

Converter that attempts to deserialize the argument to the given type.

Link copied to clipboard
class SnowflakeConverter(var validator: Validator<Snowflake> = null) : SingleConverter<Snowflake>

Argument converter for Discord ID arguments, converting them into Snowflake.

Link copied to clipboard
class StringCoalescingConverter(shouldThrow: Boolean = false, var validator: Validator<String> = null) : CoalescingConverter<String>

Coalescing argument converter that simply joins all arguments with spaces to produce a single string.

Link copied to clipboard
class StringConverter(val maxLength: Int? = null, val minLength: Int? = null, var validator: Validator<String> = null) : SingleConverter<String>

Converter that simply returns the argument as given.

Link copied to clipboard

Argument converter for supported locale, converting them into Locale objects.

Link copied to clipboard
class TagConverter(channelGetter: suspend () -> ForumChannel?? = null, var validator: Validator<ForumTag> = null) : SingleConverter<ForumTag>

Argument converter for ForumTag arguments.

Link copied to clipboard

Argument converter for discord-formatted timestamp arguments.

Link copied to clipboard
class UserConverter(useReply: Boolean = true, var validator: Validator<User> = null) : SingleConverter<User>

Argument converter for discord User arguments.

Functions

Link copied to clipboard
inline fun <E : Enum<E>, ChoiceEnum> getEnum(arg: String, locale: Locale): E?

The default choice enum value getter — matches choice enums via a case-insensitive string comparison with the names.