Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E203 E501 W503 W504
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ What changes were made?

## Checklist

- [ ] I've run the `pre_push.py` script to format and lint code.
- [ ] I've checked this pull request runs on `Python 3.6.X`.
- [ ] This fixes something in [Issues](https://github.com/eunwoo1104/discord-py-slash-command/issues).
- Issue:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
jobs:
lint-multi-os:
name: Lint ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- uses: actions/cache@v1
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
restore-keys: |
v0-${{ runner.os }}-pip-lint-
v0-${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[lint]
- name: Run black
run: black --check --verbose .
- name: Run flake8
run: flake8 --exclude docs --statistics
- name: Run isort
run: isort -cv .
- name: Run sphinx
run: sphinx-build -W --keep-going docs/ /tmp/foo
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
name: CI
on: [pull_request, push]
36 changes: 7 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
.idea
__pycache__
test.py
test2.py
test3.py
docs/_build
slash.log
test
__*.py
soontm.png

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.egg-info/
*.eggs/
*.pyc
.cache/
_build/
build/
dist/
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://discord-py-slash-command.readthedocs.io/en/latest/">Documentation</a> ⦿
<a href="https://discord.gg/KkgMBVuEkx">Discord Server</a>
</p>

## About
Discord Slash Commands are a new implementation for the Bot API that utilize the forward-slash "/" symbol.
Released on 15 December 2020, many bot developers are still learning to learn how to implement this into
Expand Down Expand Up @@ -79,8 +79,8 @@ def setup(bot):
```

--------
This library is based on gateway event. If you are looking for webserver based, have a look at this:
[dispike](https://github.com/ms7m/dispike)
[discord-interactions-python](https://github.com/discord/discord-interactions-python)
Or for other languages:
[discord-api-docs Community Resources: Interactions](https://discord.com/developers/docs/topics/community-resources#interactions)
- This library is based on gateway event. If you are looking for webserver based, have a look at this:
- [dispike](https://github.com/ms7m/dispike)
- [discord-interactions-python](https://github.com/discord/discord-interactions-python)
- Or for other languages:
- [discord-api-docs Community Resources: Interactions](https://discord.com/developers/docs/topics/community-resources#interactions)
17 changes: 8 additions & 9 deletions discord_slash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
:license: MIT
"""

from .client import SlashCommand
from .model import SlashCommandOptionType
from .context import SlashContext
from .context import ComponentContext
from .dpy_overrides import ComponentMessage
from .utils import manage_commands
from .utils import manage_components

__version__ = "1.2.2"
from .client import SlashCommand # noqa: F401
from .const import __version__ # noqa: F401
from .context import ComponentContext # noqa: F401
from .context import SlashContext # noqa: F401
from .dpy_overrides import ComponentMessage # noqa: F401
from .model import SlashCommandOptionType # noqa: F401
from .utils import manage_commands # noqa: F401
from .utils import manage_components # noqa: F401
Loading