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

MutableCommandClientConfiguration

class MutableCommandClientConfiguration : CommandClientConfiguration

A mutable implementation of the CommandClientConfiguration.

Constructors

<init>

MutableCommandClientConfiguration()

A mutable implementation of the 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

var 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: MutableList<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

alwaysAcceptDefaultPrefix

fun alwaysAcceptDefaultPrefix(alwaysAcceptDefaultPrefix: Boolean): Unit

buildPermissionErrorMessage

fun buildPermissionErrorMessage(context: Context): Message

A function that build an permission error for the context.

setAcceptMentionPrefix

fun setAcceptMentionPrefix(acceptMentionPrefix: Boolean): Unit

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

setDefaultPrefix

fun setDefaultPrefix(prefix: String): Unit

setOwnerPermission

fun setOwnerPermission(ownerPermission: Boolean): Unit

setOwners

fun setOwners(owners: MutableList<Long>): Unit

setPermissionErrorMessageBuilder

fun setPermissionErrorMessageBuilder(builder: Function<Context, Message>): Unit

setSendTyping

fun setSendTyping(sendTyping: Boolean): Unit

Sets whether the bot should send typing before executing the command or not.

toImmutableCommandClientConfiguration

fun toImmutableCommandClientConfiguration(): ImmutableCommandClientConfiguration

Converts this into an ImmutableCommandClientConfiguration.