Skip to content

Commit ae0ff31

Browse files
authored
Initial commit
1 parent f3f819a commit ae0ff31

29 files changed

+1408
-1
lines changed

.github/CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributing to nextcord-ext-help-commands
2+
3+
First off, thanks for taking the time to contribute. It makes the library substantially better. :+1:
4+
5+
The following is a set of guidelines for contributing to the repository. These are guidelines, not hard rules.
6+
7+
## This is too much to read! I want to ask a question
8+
9+
Generally speaking questions are better suited in our resources below.
10+
11+
- The official support server: <https://discord.gg/ZebatWssCB>
12+
- The Discord API server under #python_discord-py: <https://discord.gg/discord-api>
13+
- [The FAQ in the documentation](https://nextcord.readthedocs.io/en/latest/faq.html)
14+
- [StackOverflow's `nextcord` tag](https://stackoverflow.com/questions/tagged/nextcord)
15+
- [StackOverflow's `discord.py` tag](https://stackoverflow.com/questions/tagged/discord.py)
16+
- [The discussions page](https://github.com/nextcord/nextcord/discussions)
17+
18+
Please try your best not to ask questions in our issue tracker. Most of them don't belong there unless they provide value to a larger audience.
19+
20+
## Good Bug Reports
21+
22+
Please be aware of the following things when filing bug reports.
23+
24+
1. Don't open duplicate issues. Please search your issue to see if it has been asked already. Duplicate issues will be closed.
25+
2. When filing a bug about exceptions or tracebacks, please include the *complete* traceback. Without the complete traceback the issue might be **unsolvable** and you will be asked to provide more information.
26+
3. Make sure to provide enough information to make the issue workable. The issue template will generally walk you through the process but they are enumerated here as well:
27+
- A **summary** of your bug report. This is generally a quick sentence or two to describe the issue in human terms.
28+
- Guidance on **how to reproduce the issue**. Ideally, this should have a small code sample that allows us to run and see the issue for ourselves to debug. **Please make sure that the token is not displayed**. If you cannot provide a code snippet, then let us know what the steps were, how often it happens, etc.
29+
- Tell us **what you expected to happen**. That way we can meet that expectation.
30+
- Tell us **what actually happens**. What ends up happening in reality? It's not helpful to say "it fails" or "it doesn't work". Say *how* it failed, do you get an exception? Does it hang? How are the expectations different from reality?
31+
- Tell us **information about your environment**. What version of nextcord and nextcord-ext-help-commands are you using? How was it installed? What operating system are you running on? These are valuable questions and information that we use.
32+
33+
If the bug report is missing this information then it'll take us longer to fix the issue. We will probably ask for clarification, and barring that if no response was given then the issue will be closed.
34+
35+
## Submitting a Pull Request
36+
37+
Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't manage to have scope creep and it's probably good to go. It would be incredibly lovely if the style is consistent to that found in the project. This project follows PEP-8 guidelines (mostly) with a column limit of 100. `black` will use the `pyproject.toml` located in the root of the project to determine the style settings.
38+
39+
It would be nice if the code is formatted with no type-checking issues before submitting a PR. To make sure, install the tools using `pip install -r requirements-dev.txt` (or poetry etc), and follow these steps:
40+
41+
- To format the code, run `pre-commit run` once your files are staged, or `task lint` to fix all files.
42+
Alternatively, run `task precommit` to install hooks to run all checks when you commit (see the [pre-commit docs](https://pre-commit.com/#quick-start)).
43+
**Note:** If the code is formatted incorrectly, `pre-commit` will fix and exit without committing - just stage and commit again.
44+
- For type-checks, run `task pyright` (or `task pyright -w` to check every file edit)
45+
**Note:** If you're using VSCode and pylance, it will use the same settings, which generally means that you don't have to run pyright. However, there can be version conflicts which may give different results when ran in CI on GitHub.
46+
47+
### Git Commit Guidelines
48+
49+
- Use present tense (e.g. "Add feature" not "Added feature")
50+
- Limit all lines to 72 characters or less.
51+
- When linking issues/prs please use the shorthand `#123` and not the full URL.
52+
53+
If you do not meet any of these guidelines, don't fret. Chances are they will be fixed upon rebasing but please do try to meet them to remove some of the workload.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Bug Report
2+
description: Report broken or incorrect behaviour
3+
labels: ["t: unconfirmed bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: >
8+
Thanks for taking the time to fill out a bug.
9+
If you want real-time support, consider joining our Discord at https://discord.gg/ZebatWssCB instead.
10+
11+
Please note that this form is for bugs only!
12+
- type: input
13+
attributes:
14+
label: Summary
15+
description: A simple summary of your bug report
16+
validations:
17+
required: true
18+
- type: textarea
19+
attributes:
20+
label: Reproduction Steps
21+
description: >
22+
What you did to make it happen.
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Minimal Reproducible Code
28+
description: >
29+
A short snippet of code that showcases the bug.
30+
render: Python
31+
- type: textarea
32+
attributes:
33+
label: Expected Results
34+
description: >
35+
What did you expect to happen?
36+
validations:
37+
required: true
38+
- type: textarea
39+
attributes:
40+
label: Actual Results
41+
description: >
42+
What actually happened?
43+
validations:
44+
required: true
45+
- type: input
46+
attributes:
47+
label: Intents
48+
description: >
49+
What intents are you using for your bot?
50+
This is the `nextcord.Intents` class you pass to the client.
51+
validations:
52+
required: true
53+
- type: textarea
54+
attributes:
55+
label: System Information
56+
description: >
57+
Include your version of nextcord-ext-help-commands (run `pip show nextcord-ext-help-commands`).
58+
If using pagination also include your nextcord-ext-menus version.
59+
Additionally, run `python -m nextcord -v` and paste this information below.
60+
This command required v1.1.0 or higher of the library. If this errors out then show some basic
61+
information involving your system such as operating system and Python version.
62+
validations:
63+
required: true
64+
- type: checkboxes
65+
attributes:
66+
label: Checklist
67+
description: >
68+
Let's make sure you've properly done due dilligence when reporting this issue!
69+
options:
70+
- label: I have searched the open issues for duplicates.
71+
required: true
72+
- label: I have shown the entire traceback, if possible.
73+
required: true
74+
- label: I have removed my token from display, if visible.
75+
required: true
76+
- type: textarea
77+
attributes:
78+
label: Additional Context
79+
description: If there is anything else to say, please do so here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask a question
4+
about: Ask questions and discuss with other users of the library.
5+
url: https://github.com/nextcord/nextcord/discussions
6+
- name: Discord Server
7+
about: Use our official Discord server to ask for help and questions as well.
8+
url: https://discord.gg/ZebatWssCB
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Request
2+
description: Suggest a feature for this library
3+
labels: ["feature request"]
4+
body:
5+
- type: input
6+
attributes:
7+
label: Summary
8+
description: >
9+
A short summary of what your feature request is.
10+
validations:
11+
required: true
12+
- type: dropdown
13+
attributes:
14+
multiple: false
15+
label: What is the feature request for?
16+
options:
17+
- nextcord.ext.help_commands
18+
- The documentation
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Additional Context
24+
description: >
25+
What is the problem and your ideal solution to the problem?
26+
What would you like this feature to do?
27+
validations:
28+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Summary
2+
3+
<!-- What is this pull request for? Does it fix any issues? -->
4+
5+
## Checklist
6+
7+
<!-- Put an x inside [ ] to check it, like so: [x] -->
8+
9+
- [ ] If code changes were made then they have been tested.
10+
- [ ] I have updated the documentation to reflect the changes.
11+
- [ ] I have run `task pyright` and fixed the relevant issues.
12+
- [ ] This PR fixes an issue.
13+
- [ ] This PR adds something new (e.g. new method or parameters).
14+
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
15+
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)

.github/workflows/lint.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up python 3.8
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: 3.8
21+
cache: pip
22+
cache-dependency-path: |
23+
requirements.txt
24+
requirements-dev.txt
25+
setup.py
26+
27+
- name: Install dependencies
28+
run: python -m pip install -r requirements-dev.txt
29+
30+
- name: Run pre-commit
31+
uses: pre-commit/[email protected]
32+
33+
pyright:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
python-version: ["3.8", "3.9", "3.10"]
38+
fail-fast: false
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v3
42+
43+
- name: Set up python ${{ matrix.python-version }}
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
cache: pip
48+
cache-dependency-path: |
49+
requirements.txt
50+
requirements-dev.txt
51+
setup.py
52+
53+
# all extras are installed to test
54+
- name: Install dependencies
55+
run: python -m pip install -r requirements-dev.txt .[voice,docs,speed]
56+
57+
- name: Set up pyright
58+
run: echo "PYRIGHT_VERSION=$(python -c 'import pyright; print(pyright.__pyright_version__)')" >> $GITHUB_ENV
59+
60+
- name: Run pyright (Linux)
61+
uses: jakebailey/[email protected]
62+
with:
63+
version: ${{ env.PYRIGHT_VERSION }}
64+
python-version: ${{ matrix.python-version }}
65+
python-platform: Linux
66+
# only add comments for 3.8
67+
no-comments: ${{ matrix.python-version != '3.8' }}
68+
warnings: true
69+
70+
- name: Run pyright (Windows)
71+
uses: jakebailey/[email protected]
72+
# run anyway
73+
if: success() || failure()
74+
with:
75+
version: ${{ env.PYRIGHT_VERSION }}
76+
python-version: ${{ matrix.python-version }}
77+
python-platform: Windows
78+
# only add comments for one platform
79+
no-comments: true
80+
warnings: true
81+
82+
slotscheck:
83+
runs-on: ubuntu-latest
84+
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v3
88+
89+
- name: Set up python 3.8
90+
uses: actions/setup-python@v4
91+
with:
92+
python-version: 3.8
93+
cache: pip
94+
cache-dependency-path: |
95+
requirements-dev.txt
96+
requirements.txt
97+
setup.py
98+
99+
- name: Install dependencies
100+
run: python -m pip install -r requirements.txt -r requirements-dev.txt
101+
102+
- name: Run slotscheck
103+
run: task slotscheck

.github/workflows/python-publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
workflow_dispatch:
15+
16+
jobs:
17+
deploy:
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.x'
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install build
31+
- name: Build package
32+
run: python -m build
33+
- name: Publish package
34+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
35+
with:
36+
user: __token__
37+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test-docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
docs:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs] --upgrade .[menus]
25+
- name: Build docs
26+
run: make -C docs html

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__pycache__/
2+
3+
*.egg-info/
4+
build/
5+
dist/
6+
_build
7+
8+
.vscode/
9+
10+
.venv

0 commit comments

Comments
 (0)