Skip to content

Commit 758d80c

Browse files
LordOfPollspre-commit-ci[bot]AstreaTSSDamegochronosirius
authored
chore: V5.1.0 (#1341)
* feat: support regex component callbacks (#1332) * feat: support regex component callbacks * docs: document regex matching component callback * ci: correct from checks. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore: switch to MIT license (#1334) * chore: switch to MIT license * ci: correct from checks. * docs: update license through github Uses githubs own license tools so the correct license is detected --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: add audit events (#1335) * feat: add audit new mod events to audit log enum * feat: add onboarding related events see discord/discord-api-docs#6041 * refactor: change log level of missing value to warning (#1339) Lets not scare people with "error"s ay? * feat: add missing message types (#1338) * feat: add missing message types * feat: add deletable message types helper * build: correct manifest * feat: support avatar decorations (#1329) * build: mirrored publish to d.py-interactions and interactions.py (#1336) * style: add newline to end of manifest * ci: fix migration issues in integration test bot * fix: copy checks when inheriting (#1342) Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com> * feat: cooldown upgrades (#1323) * docs: add changelog page * style: add EOF newline * docs: add 5.1.0 to changelog.md * style: remove trailing whitespace * fix: reintroduce imports at namespace linter removed * feat: sync improvements (#1328) * refactor: improve readability of sync logic * fix: improve initial sync caching * docs: add docstring to update_command_cache * feat: add command deletion to debug ext * feat: rate limit improvements (#1321) * fix: refactor all http routes to generate buckets properly * fix: resolve routes regex missed * feat: allow concurrent api calls from the same bucket * feat: restore bucketLock.locked property * feat: further bucketlock improvements * feat: allow bucketlock blocking to be toggled * refactor: resolve ruff compliant * fix: correct webhook http * fix: wrong check condition in the component callback (#1352) * fix: error when dispatch component callback (#1351) * docs: adjust and fix many parts of the docs (#1353) * docs: adjust and fix many parts of the docs * docs: add note about event object for v4 migration * docs: replace more instances of InteractionContext --------- Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com> * feat: caching improvements (#1350) * feat: add support for force fetching * feat: track if a user object has been fetched * feat: add force flag to client helper methods * feat: update all cache fetch methods to have a force param * feat: add reset_with_key and get_cooldown_time_with_key (#1345) * made get_cooldown_with_key async for consistency, added reset_with_key and get_cooldown_time_with_key * ci: correct from checks. * fixed pre-commit problems * comment on #1345, resolved * made Cooldown.reset_all async #1345 * bot.load => bot.load_extension * reverted 8217f4e * made get_cooldown_time_with_key and reset_with_key sync --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Astrea <25420078+AstreaTSS@users.noreply.github.com> Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com> Co-authored-by: Damego <damego.dev@gmail.com> Co-authored-by: chronosirius <73508925+chronosirius@users.noreply.github.com>
2 parents 67dc7d6 + eca3263 commit 758d80c

Some content is hidden

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

56 files changed

+1606
-1237
lines changed

.github/workflows/python-publish.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
1-
name: Publish release
1+
name: Publish to PyPI under the mirrored and original name
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
PACKAGE_NAME1: discord-py-interactions
10+
PACKAGE_NAME2: interactions.py
11+
212
jobs:
3-
deploy:
4-
name: Deploy
13+
build-and-publish:
514
runs-on: ubuntu-latest
15+
if: "!github.event.release.prerelease"
616
steps:
7-
- uses: actions/checkout@v2
17+
- name: Check out repository
18+
uses: actions/checkout@v2
19+
820
- name: Set up Python
921
uses: actions/setup-python@v2
1022
with:
11-
python-version: '3.x'
23+
python-version: '3.10'
24+
1225
- name: Install dependencies
1326
run: |
1427
python -m pip install --upgrade pip
15-
pip install setuptools wheel twine
16-
- name: Build and publish
28+
pip install build twine
29+
30+
- name: Build and publish packages
1731
env:
18-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
19-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
32+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
2033
run: |
21-
python setup.py sdist bdist_wheel
22-
twine upload dist/*
23-
on:
24-
release:
25-
types: [released]
34+
for PACKAGE_NAME in $PACKAGE_NAME1 $PACKAGE_NAME2; do
35+
sed -i "s/name=.*,/name=\"$PACKAGE_NAME\",/" setup.py
36+
python -m build --outdir dist/$PACKAGE_NAME
37+
python -m twine upload --skip-existing -u __token__ -p $PYPI_API_TOKEN dist/$PACKAGE_NAME/*
38+
done

LICENSE

Lines changed: 21 additions & 674 deletions
Large diffs are not rendered by default.

docs/src/API Reference/API Reference/models/Internal/active_voice_state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
??? Hint "Example Usage:"
22
```python
3-
from interactions import slash_command, slash_option, OptionType, InteractionContext
3+
from interactions import slash_command, slash_option, OptionType, SlashContext
44
from interactions.api.voice.audio import AudioVolume
55

66

77
@slash_command("play")
88
@slash_option("song", "The song to play", OptionType.STRING, required=True)
9-
async def test_cmd(ctx: InteractionContext, song: str):
9+
async def test_cmd(ctx: SlashContext, song: str):
1010
await ctx.defer()
1111

1212
if not ctx.voice_state:

docs/src/Guides/02 Creating Your Bot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To make a bot on Discord, you must first create an application on Discord. Thank
1212
4. Give your application a name, and press `Create`
1313
<br>![Create Application Dialogue](../images/CreatingYourBot/CreateAnApplication.png "The Create Application Dialogue")
1414

15-
??? note
15+
???+ note
1616
Don't worry if there isn't a `team` option, this only appears if you have a developer team.
1717
If you have a team and want to assign your bot to it, use this.
1818

@@ -22,7 +22,7 @@ To make a bot on Discord, you must first create an application on Discord. Thank
2222
6. You now have a bot! You're going to want to press `Reset Token` to get your bot's token, so you can start coding
2323
<br>![A section that shows your bot and its token](../images/CreatingYourBot/BotUserToken.png "The bot display")
2424

25-
??? note
25+
???+ note
2626
You may (or may not) be asked to enter your password or 2FA authentication code to confirm this action.
2727

2828
!!! warning "Warning: Do not share your token!"

0 commit comments

Comments
 (0)