Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add autocomplete support #52

Merged
merged 17 commits into from
May 23, 2024

Conversation

ExampleWasTaken
Copy link
Contributor

Description

This PR adds support for the autocomplete feature of slash commands.

The implementation closely follows the already existing infrastructure by adding a third (and optional) argument for an autocomplete-callback function to the slashCommand() function.

Test Results

This PR has no effect on existing code. It only lays the groundwork for future commands that may require autocompletion.

Additional Information

This PR is required for #51.

Discord Username

examplewastaken

@ExampleWasTaken ExampleWasTaken mentioned this pull request May 12, 2024
Copy link
Member

@benw202 benw202 left a comment

Choose a reason for hiding this comment

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

Please add src/lib/autocomplete.ts to the index.ts file in the lib dir.

You will then need to change your import in slashCommand.ts

@ExampleWasTaken
Copy link
Contributor Author

Yep good point. Will do.

@ExampleWasTaken ExampleWasTaken marked this pull request as draft May 12, 2024 18:55
src/lib/autocomplete.ts Outdated Show resolved Hide resolved
src/lib/slashCommand.ts Outdated Show resolved Hide resolved
src/lib/slashCommand.ts Outdated Show resolved Hide resolved
@ExampleWasTaken ExampleWasTaken marked this pull request as ready for review May 12, 2024 20:38
.github/CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/CONTRIBUTING.md Outdated Show resolved Hide resolved
ExampleWasTaken and others added 2 commits May 14, 2024 21:40
Co-authored-by: BenW <bwilliams12@me.com>
Co-authored-by: BenW <bwilliams12@me.com>
@benw202 benw202 requested a review from pdellaert May 14, 2024 19:44
@benw202 benw202 merged commit 11f38a8 into flybywiresim:staging May 23, 2024
3 checks passed
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.

None yet

3 participants