Skip to content

Commit f7e5670

Browse files
authored
Merge: v5.0.0
2 parents 8bc3e1d + 7629955 commit f7e5670

File tree

724 files changed

+42725
-146133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

724 files changed

+42725
-146133
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*.(py|md)]
7+
indent_style = space
8+
indent_size = 4
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.yml]
14+
indent_style = space
15+
indent_size = 2
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true

.github/FUNDING.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/report-bug.yml

Lines changed: 44 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,73 @@
1-
name: Report Bug
2-
description: Create an Issue to report a bug with/about the library.
3-
title: "[BUG] "
4-
labels: ["bug"]
5-
assignees:
6-
- DeltaXWizard
7-
- EdVraz
8-
- Astrea49
9-
- Toricane
10-
- Catalyst4222
11-
- Damego
1+
name: Bug Report
2+
description: Report broken or incorrect behavior.
3+
labels: ["Bug::Library"]
4+
title: "[BUG] Your Title Here"
5+
126
body:
137
- type: markdown
148
attributes:
15-
value: |
9+
value: >
1610
Thank you for taking the time to fill out this bug report!
1711
We rely on users to tell us things that we might not find on our own,
1812
and your help is greatly valued by the team and others contributing.
19-
- type: textarea
20-
id: process
13+
If you want real-time support, consider joining our [Discord](https://discord.gg/interactions) instead.
14+
15+
- type: input
2116
attributes:
22-
label: Describe the bug.
23-
description: Please give us an in-depth description of the bug you are having.
24-
placeholder: When trying to use feature X, I was unable to make task Y work.
17+
label: Library Version
18+
description: Which version of the library you are currently running.
2519
validations:
2620
required: true
21+
2722
- type: textarea
28-
id: steps
2923
attributes:
30-
label: List the steps.
31-
description: Please give us a step-by-step process of how you were able to produce this.
32-
placeholder: |
33-
1. Import the module in Python.
34-
2. Create a client variable for the library.
35-
3. Try creating a slash command.
36-
4. See the traceback error given in the terminal or logger file.
24+
label: Describe the Bug
25+
description: A simple summary of your bug report
3726
validations:
3827
required: true
28+
3929
- type: textarea
40-
id: expectation
4130
attributes:
42-
label: What you expected.
43-
description: Please tell us what you expect for this to do when it ran.
44-
placeholder: When I create a slash command, the command should be created and functional.
31+
label: Steps to Reproduce
32+
description: Please give us a step-by-step process of how you were able to produce this.
4533
validations:
4634
required: true
35+
4736
- type: textarea
48-
id: result
4937
attributes:
50-
label: What you saw.
51-
description: Please tell us what you found when you actually ran this.
52-
placeholder: Instead, I received this traceback error given from my Python terminal.
53-
value: |
54-
Instead, I received this traceback error given from my Python terminal:
55-
```
56-
Traceback (most recent call last):
57-
File "A:\Amogus\Python\interactions-bot\main.py", line 6
58-
raise SussyBaka("your code doesn't work, silly!")
59-
^
60-
61-
SussyBaka: your code doesn't work, silly!
62-
```
38+
label: Expected Results
39+
description: A clear and concise description of what you expected to happen.
6340
validations:
6441
required: true
65-
- type: dropdown
66-
id: version
42+
43+
- type: textarea
6744
attributes:
68-
label: What version of the library did you use?
69-
multiple: false
70-
options:
71-
- release
72-
- stable
73-
- unstable
74-
validations:
75-
required: true
76-
- type: input
77-
id: version-specific
45+
label: Minimal Reproducible Code
46+
description: A short snippet of code that showcases the bug.
47+
render: python
48+
49+
- type: textarea
7850
attributes:
79-
label: Version specification
80-
description: "If you're using a pre-release or release candidate, please specify which one."
51+
label: Traceback
52+
description: Was there a traceback? If so, please provide it.
8153
validations:
8254
required: false
55+
8356
- type: checkboxes
84-
id: accept
8557
attributes:
86-
label: Code of Conduct
87-
description: By submitting this Issue, you agree to follow our [contribution requirements.](https://github.com/interactions-py/library/blob/unstable/CONTRIBUTING.rst)
58+
label: Checklist
59+
description: Let's make sure you've properly done due diligence when reporting this issue!
8860
options:
89-
- label: I agree to follow the contribution requirements.
61+
- label: I have searched the open issues for duplicates.
9062
required: true
63+
- label: I have shown the entire traceback, if possible.
64+
required: true
65+
- label: I have removed my token from display, if visible.
66+
required: true
67+
- label: I have attempted to debug this myself, and I believe this issue is with the library
68+
required: true
69+
70+
- type: textarea
71+
attributes:
72+
label: Additional Information
73+
description: Any other information about the problem.

.github/ISSUE_TEMPLATE/request-feature.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
1-
name: Request a new feature
2-
description: Create an Issue to suggest or propose implementing something(s).
3-
title: "[REQUEST] "
4-
labels: ["documentation", "enhancement"]
5-
assignees:
6-
- DeltaXWizard
7-
- EdVraz
8-
- Astrea49
9-
- Toricane
10-
- Catalyst4222
11-
- Damego
1+
name: Feature Request
2+
description: Request new functionality.
3+
title: "[FEAT] Your Title Here"
4+
125
body:
136
- type: markdown
147
attributes:
158
value: |
169
Thank you for taking the time to fill out this feature request!
1710
We rely on users to tell us things that we might not find on our own,
1811
and your help is greatly valued by the team and others contributing.
12+
1913
- type: textarea
20-
id: process
2114
attributes:
22-
label: Describe the feature.
23-
description: Please give us an in-depth description of the feature you wish to see.
24-
placeholder: I am not a fan of doing X for Y, so I would like...
15+
label: Problem Description
16+
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
2517
validations:
2618
required: true
19+
20+
- type: textarea
21+
attributes:
22+
label: Proposed Solution
23+
description: A clear and concise description of what you want to happen.
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
attributes:
29+
label: Alternatives Considered
30+
description: A clear and concise description of any alternative solutions or features you've considered.
31+
32+
- type: textarea
33+
attributes:
34+
label: Additional Information
35+
description: Any additional information that may help clarify your request.
36+
2737
- type: checkboxes
2838
id: accept
2939
attributes:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
1-
## About
1+
## Pull Request Type
2+
<!-- Check the appropriate option -->
23

3-
This pull request is about (X), which does (Y).
4+
- [ ] Feature addition
5+
- [ ] Bugfix
6+
- [ ] Documentation update
7+
- [ ] Code refactor
8+
- [ ] Tests improvement
9+
- [ ] CI/CD pipeline enhancement
10+
- [ ] Other: [Replace with a description]
411

5-
## Checklist
12+
## Description
13+
<!-- Provide a clear and concise description of the purpose of this PR and why it should be merged -->
14+
<!-- If your code adds or changes features, a usage example would be helpful -->
15+
16+
17+
## Changes
18+
<!-- List the changes you have made in a bullet-point format -->
619

7-
- [ ] The ``pre-commit`` code linter has been run over all edited files to ensure the code is linted.
8-
- [ ] I've ensured the change(s) work on `3.8.6` and higher.
9-
- [ ] I have added the `versionadded`, `versionchanged` and `deprecated` to any new or changed user-facing function I committed.
10-
<!-- If you are unsure what the next version is, feel free to ask in #unstable at https://discord.gg/interactions -->
1120

12-
### Pull-Request specification
21+
## Related Issues
22+
<!-- If this PR is related to any open issues, please mention them using "#ISSUENUMBER" -->
1323

14-
I've made this pull request: (check all that apply)
15-
- [ ] For the documentation
16-
- [ ] To add a new feature
17-
- [ ] As a general enhancement
18-
- [ ] As a refactor of the library/the library's code
19-
- [ ] To fix an existing bug
20-
- [ ] To resolve #ISSUENUMBER
2124

25+
## Test Scenarios
26+
<!-- Provide clear instructions on how to test your changes, where applicable - if no tests are required, explain why -->
2227

23-
This is:
24-
- [ ] A breaking change
2528

26-
<!--- Expand this when more comes up--->
29+
## Python Compatibility
30+
<!-- Testing 3.11 is not strictly required, but it would be nice if you could confirm that it works. -->
31+
- [ ] I've ensured my code works on Python `3.10.x`
32+
- [ ] I've ensured my code works on Python `3.11.x`
33+
34+
35+
## Checklist
36+
<!-- If you have not completed all of the following, there is a good chance your PR will not be merged. -->
37+
- [ ] I've run the `pre-commit` code linter over all edited files
38+
- [ ] I've tested my changes on supported Python versions
39+
- [ ] I've added tests for my code, if applicable
40+
- [ ] I've updated / added documentation, where applicable

.github/workflows/docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: docs-builder
2+
on:
3+
push:
4+
branches:
5+
- stable
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
if: github.event.repository.fork == false
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- uses: actions/cache@v3
18+
with:
19+
key: ${{ github.ref }}
20+
path: .cache
21+
- run: pip install -e .[docs]
22+
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
23+
- run: mkdocs gh-deploy
24+
env:
25+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
26+
DEPLOY: True

.github/workflows/precommit.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: precommit-action
2+
on: [push, pull_request]
3+
jobs:
4+
linter_name:
5+
name: runner / Pre-commit actions
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- name: Set up Python 3.10
10+
uses: actions/setup-python@v4
11+
with:
12+
python-version: '3.10'
13+
- name: Setup annotations
14+
uses: PennyDreadfulMTG/setup-linters@main
15+
- name: Install Pre-commit
16+
run: |
17+
pip install pre-commit
18+
- name: Run Pre-commit
19+
run: |
20+
pre-commit run --all-files

.github/workflows/pytest-push.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: pytest
2+
on: push
3+
jobs:
4+
pytest:
5+
name: runner / pytest tests
6+
runs-on: ubuntu-latest
7+
strategy:
8+
max-parallel: 1
9+
matrix:
10+
extras:
11+
- .
12+
- .[speedup]
13+
- .[voice]
14+
- .[all]
15+
python-version:
16+
- "3.10"
17+
- "3.11"
18+
include:
19+
- extras: .[all]
20+
python-version: "3.10"
21+
RUN_TESTBOT: true
22+
- extras: .[all]
23+
python-version: "3.11"
24+
RUN_TESTBOT: true
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2.3.1
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
cache: 'pip'
33+
- name: Install ffmpeg & opus
34+
run: sudo apt-get update && sudo apt-get install ffmpeg libopus-dev
35+
- name: Install pytest
36+
run: |
37+
pip install wheel
38+
pip install -e ${{ matrix.extras }}
39+
pip install .[tests]
40+
- name: Run Tests
41+
env:
42+
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
43+
RUN_TESTBOT: ${{ matrix.RUN_TESTBOT }}
44+
run: |
45+
pytest
46+
coverage xml -i
47+
- name: Upload Coverage
48+
run: |
49+
curl -Os https://uploader.codecov.io/latest/linux/codecov
50+
chmod +x codecov
51+
./codecov
52+
- name: Publish Test Report
53+
uses: mikepenz/action-junit-report@v3
54+
if: always() # always run even if the previous step fails
55+
with:
56+
report_paths: '**/TestResults.xml'
57+
check_name: 'Pytest Results'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ __pycache__
1515
*.token
1616
*.pypirc
1717
*.code-workspace
18+
/coverage.xml
19+
/TestResults.xml
20+
/.coverage

0 commit comments

Comments
 (0)