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

Add autocomplete example #503

Merged
merged 7 commits into from
Nov 26, 2021
Merged

Add autocomplete example #503

merged 7 commits into from
Nov 26, 2021

Conversation

krittick
Copy link
Contributor

@krittick krittick commented Nov 24, 2021

Summary

Adds an autocomplete example that demonstrates both basic usage, and usage of the AutocompleteContext.options parameter.

Closes #487

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue. (feature request)
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change - new example

@ChickenDevs ChickenDevs marked this pull request as ready for review November 24, 2021 23:43
@ChickenDevs ChickenDevs marked this pull request as draft November 24, 2021 23:43
@krittick krittick marked this pull request as ready for review November 25, 2021 01:01
@krittick
Copy link
Contributor Author

Could probably use some work on the comments/docstrings for the example, though I tried to make it clear which concepts are being demonstrated.

@Lulalaby Lulalaby added documentation Improvements or additions to documentation priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer labels Nov 25, 2021
@Lulalaby Lulalaby added this to In progress in v2.0 via automation Nov 25, 2021
@Lulalaby Lulalaby added this to the v2.0 milestone Nov 25, 2021
Copy link
Member

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

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

I like that! Thanks.

Not gonna approve it tho because I'm unsure about the variable naming.

Copy link
Member

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

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

Maybe assign BASIC_ALLOWED and other config lists to bot.basic_allowed, etc.

examples/app_commands/slash_autocomplete.py Outdated Show resolved Hide resolved
examples/app_commands/slash_autocomplete.py Outdated Show resolved Hide resolved
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
auto-merge was automatically disabled November 25, 2021 03:33

Head branch was pushed to by a user without write access

Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
@krittick
Copy link
Contributor Author

Maybe assign BASIC_ALLOWED and other config lists to bot.basic_allowed, etc.

I actually do this in my own bot and agree it's a best practice, but I figured that keeping things simple for this example would be best to keep the focus on the autocomplete functionality itself. It's easy enough (or should be) for bot developers to know to store those as class variables, etc. where appropriate.

@Lulalaby
Copy link
Member

I figured that keeping things simple for this example would be best to keep the focus on the autocomplete functionality itself

Agreeing with that

@Lulalaby Lulalaby merged commit fd36b07 into Pycord-Development:master Nov 26, 2021
v2.0 automation moved this from In progress to Done Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer
Projects
No open projects
v2.0
  
Done
Development

Successfully merging this pull request may close these issues.

Add an autocomplete example
4 participants