Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feat: Added prefix command.#199

Merged
emyfops merged 3 commits into
lambda-client:1.21.11lambda-client/lambda:1.21.11from
KMatias123:1.21.11KMatias123/lambda-new:1.21.11Copy head branch name to clipboard
Dec 21, 2025
Merged

Feat: Added prefix command.#199
emyfops merged 3 commits into
lambda-client:1.21.11lambda-client/lambda:1.21.11from
KMatias123:1.21.11KMatias123/lambda-new:1.21.11Copy head branch name to clipboard

Conversation

@KMatias123

Copy link
Copy Markdown
Contributor

Prefix command, ;prefix <something>

People expect it and every other client has it :3

Comment thread src/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
Collaborator

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
Contributor Author

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 thread src/main/kotlin/com/lambda/command/commands/PrefixCommand.kt Outdated
Comment thread src/main/kotlin/com/lambda/command/commands/PrefixCommand.kt
@KMatias123 KMatias123 requested a review from emyfops December 20, 2025 15:54
@emyfops

emyfops commented Dec 21, 2025

Copy link
Copy Markdown
Collaborator

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

@KMatias123 KMatias123 requested a review from emyfops December 21, 2025 09:03
@emyfops emyfops merged commit cbdd5ce into lambda-client:1.21.11 Dec 21, 2025
@KMatias123 KMatias123 deleted the 1.21.11 branch December 21, 2025 15:12
Sign up for free to 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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.