Content-Length: 242981 | pFad | https://github.com/interactions-py/interactions.py/pull/1631

E0 docs: improve slash command guide by AstreaTSS · Pull Request #1631 · interactions-py/interactions.py · GitHub
Skip to content

docs: improve slash command guide #1631

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

Merged

Conversation

AstreaTSS
Copy link
Member

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

This PR goes in and improves the slash command guide by fixing typos and other small mistakes, making some wording clearer, and explaining other parts in more detail.

Changes

The diff isn't terribly complex, but:

  • Lots of grammar and typo fixes, including proper casing the titles.
  • Make subcommand example more consistent and clarify on potentially confusing pitfalls.
  • Clarify on ranges for integers and numbers, and correct typehint for mentionables.
  • Added note about how to have differing slash option and parameter names for options.
  • Actually show a required argument before an optional argument when the docs mention to do this.
  • Note that autocomplete does not perform search narrowing for you. I debated recommending thefuzz or rapidfuzz, but decided against it since that may narrow someone's solution set.
  • Recommend using typing.Annotation for the parameter option method.
  • Rewrite "Reusing Checks" to be about making a decorator that wraps a check, instead of suddenly introducing extensions and extension checks. It's all in the extensions guide anyways, so...
  • Note how checks check for all conditions to be true.
  • Add note about how to reuse checks if you're using SlashCommandOption directly.
  • Rewrite the error handling section:
    • The section now notes the default behavior of interactions.py, including send_command_tracebacks.
    • Note how to handle errors for a single command.
    • Add warning noting exactly what replacing the default error handler entails.

Related Issues

Test Scenarios

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@silasary silasary merged commit 57e4f77 into interactions-py:unstable Mar 21, 2024
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/interactions-py/interactions.py/pull/1631

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy