Skip to content

Commit 859beb6

Browse files
committed
Merge branch 'components'
2 parents c9f67da + 31039ce commit 859beb6

31 files changed

+2334
-549
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
ignore = E203 E501 W503 W504

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ What changes were made?
88

99
## Checklist
1010

11+
- [ ] I've run the `pre_push.py` script to format and lint code.
1112
- [ ] I've checked this pull request runs on `Python 3.6.X`.
1213
- [ ] This fixes something in [Issues](https://github.com/eunwoo1104/discord-py-slash-command/issues).
1314
- Issue:

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
jobs:
2+
lint-multi-os:
3+
name: Lint ${{ matrix.os }}
4+
runs-on: ${{ matrix.os }}
5+
steps:
6+
- uses: actions/checkout@v2
7+
- uses: actions/setup-python@v1
8+
with:
9+
python-version: 3.x
10+
- uses: actions/cache@v1
11+
with:
12+
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
13+
path: ~/.cache/pip
14+
restore-keys: |
15+
v0-${{ runner.os }}-pip-lint-
16+
v0-${{ runner.os }}-pip-
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install .[lint]
21+
- name: Run black
22+
run: black --check --verbose .
23+
- name: Run flake8
24+
run: flake8 --exclude docs --statistics
25+
- name: Run isort
26+
run: isort -cv .
27+
- name: Run sphinx
28+
run: sphinx-build -W --keep-going docs/ /tmp/foo
29+
strategy:
30+
matrix:
31+
os: [macOS-latest, ubuntu-latest, windows-latest]
32+
name: CI
33+
on: [pull_request, push]

.gitignore

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
.idea
2-
__pycache__
3-
test.py
4-
test2.py
5-
test3.py
6-
docs/_build
7-
slash.log
8-
test
9-
__*.py
10-
soontm.png
11-
12-
# Distribution / packaging
13-
.Python
14-
build/
15-
develop-eggs/
16-
dist/
17-
downloads/
18-
eggs/
19-
.eggs/
20-
lib/
21-
lib64/
22-
parts/
23-
sdist/
24-
var/
25-
wheels/
26-
share/python-wheels/
27-
*.egg-info/
28-
.installed.cfg
291
*.egg
30-
MANIFEST
2+
*.egg-info/
3+
*.eggs/
4+
*.pyc
5+
.cache/
6+
_build/
7+
build/
8+
dist/

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<a href="https://discord-py-slash-command.readthedocs.io/en/latest/">Documentation</a> ⦿
1515
<a href="https://discord.gg/KkgMBVuEkx">Discord Server</a>
1616
</p>
17-
17+
1818
## About
1919
Discord Slash Commands are a new implementation for the Bot API that utilize the forward-slash "/" symbol.
2020
Released on 15 December 2020, many bot developers are still learning to learn how to implement this into
@@ -79,8 +79,9 @@ def setup(bot):
7979
```
8080

8181
--------
82-
- This library is based on gateway event. If you are looking for webserver based, have a look at this:
83-
- [dispike](https://github.com/ms7m/dispike)
84-
- [discord-interactions-python](https://github.com/discord/discord-interactions-python)
85-
- Or for other languages:
82+
- This library is based on gateway event. If you are looking for webserver based, have a look at this:
83+
- [dispike](https://github.com/ms7m/dispike)
84+
- [discord-interactions-python](https://github.com/discord/discord-interactions-python)
85+
- Or for other languages:
8686
- [discord-api-docs Community Resources: Interactions](https://discord.com/developers/docs/topics/community-resources#interactions)
87+

discord_slash/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
:license: MIT
99
"""
1010

11-
from .client import SlashCommand
12-
from .model import SlashCommandOptionType
13-
from .context import SlashContext
14-
from .utils import manage_commands
15-
16-
__version__ = "1.2.2"
11+
from .client import SlashCommand # noqa: F401
12+
from .const import __version__ # noqa: F401
13+
from .context import ComponentContext, SlashContext # noqa: F401
14+
from .dpy_overrides import ComponentMessage # noqa: F401
15+
from .model import ButtonStyle, ComponentType, SlashCommandOptionType # noqa: F401
16+
from .utils import manage_commands # noqa: F401
17+
from .utils import manage_components # noqa: F401

0 commit comments

Comments
 (0)