common / me.schlaubi.regnumutils.command.configuration / ImmutableCommandClientConfiguration

ImmutableCommandClientConfiguration

class ImmutableCommandClientConfiguration : CommandClientConfiguration

An immutable implementation of CommandClientConfiguration

Constructors

<init>

ImmutableCommandClientConfiguration(sendTyping: Boolean, acceptMentionPrefix: Boolean, messageBuilder: (Context) -> Message, ownerPermission: Boolean, defaultPrefix: String, alwaysDefaultPrefix: Boolean, owners: List<Long>)

An immutable implementation of CommandClientConfiguration

Properties

acceptMentionPrefix

val acceptMentionPrefix: Boolean

Whether the bot should listen for commands prefixed by its mention or not.

alwaysDefaultPrefix

val alwaysDefaultPrefix: Boolean

Whether the default prefix should always be valid or not. Event if there is a custom prefix for that guild

defaultPrefix

val defaultPrefix: String

The default prefix.

messageBuilder

val messageBuilder: (Context) -> Message

A function that build a permission error message

ownerPermission

val ownerPermission: Boolean

Whether the owner should be allowed to execute every command or not.

owners

val owners: List<Long>

A list of the bot-owner's id's

sendTyping

val sendTyping: Boolean

Whether the bot should send typing before executing the command or not.

Functions

buildPermissionErrorMessage

fun buildPermissionErrorMessage(context: Context): Message

A function that build an permission error for the context.