Skip to content

Feat: Added prefix command. - #199

Merged
emyfops merged 3 commits into
lambda-client:1.21.11from
KMatias123:1.21.11
Dec 21, 2025
Merged

Feat: Added prefix command.#199
emyfops merged 3 commits into
lambda-client:1.21.11from
KMatias123:1.21.11

Conversation

@KMatias123

Copy link
Copy Markdown
Contributor

Prefix command, ;prefix <something>

People expect it and every other client has it :3

Comment threadsrc/main/kotlin/com/lambda/command/commands/PrefixCommand.kt Outdated
}
val prefixChar = prefix.first()
val configurable = Configuration.configurableByName("command")?: return@executeWithResult failure("No command configurable found.")
val setting = (configurable.settings.find { it.name == "prefix" }?: return@executeWithResult failure("No prefix setting found.")) as Setting<*, Char>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can safe cast using as? instead of wrapping the setting with parenthesis and returning if it is null. Instead you safe cast and returns if the cast is also null

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is correct now right?

Comment threadsrc/main/kotlin/com/lambda/command/commands/PrefixCommand.kt Outdated
Comment threadsrc/main/kotlin/com/lambda/command/commands/PrefixCommand.kt
@emyfops

Copy link
Copy Markdown
Contributor

@KMatias123 change the prefix to greedyString and this will be good to merge

@emyfops
emyfops merged commit cbdd5ce into lambda-client:1.21.11Dec 21, 2025
@KMatias123
KMatias123 deleted the 1.21.11 branch December 21, 2025 15:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@KMatias123@emyfops