Skip to content

Commit

Permalink
Merge branch 'master' into fix/missing-automod-values
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby authored Dec 16, 2022
2 parents 842e649 + 59eb292 commit 2f82cf0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
# - --remove-duplicate-keys
# - --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.0
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -27,7 +27,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black
# See https://github.com/psf/black/issues/2188#issuecomment-1289317647 for why we can't use the --preview flag.
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,18 @@ These changes are available on the `master` branch, but have not yet been releas

### Fixed

- Fixed bridge groups missing the `parent` attribute.
([#1823](https://github.com/Pycord-Development/pycord/pull/1823))

## [2.3.2] - 2022-12-03

### Fixed

- Fixed another `AttributeError` relating to the new `bridge_commands` attribute on
`ext.bridge.Bot`. ([#1815](https://github.com/Pycord-Development/pycord/pull/1815))
- Fixed an `AttributeError` in select relating to the select type.
([#1814](https://github.com/Pycord-Development/pycord/pull/1814))
- Fix `Thread.applied_tags` always returning an empty list.
- Fixed `Thread.applied_tags` always returning an empty list.
([#1817](https://github.com/Pycord-Development/pycord/pull/1817))

## [2.3.1] - 2022-11-27
Expand Down
13 changes: 9 additions & 4 deletions discord/ext/bridge/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,17 @@ class BridgeCommandGroup(BridgeCommand):
If :func:`map_to` is used, the mapped slash command.
"""

ext_variant: BridgeExtGroup
slash_variant: BridgeSlashGroup

def __init__(self, callback, *args, **kwargs):
self.ext_variant: BridgeExtGroup = BridgeExtGroup(callback, *args, **kwargs)
name = kwargs.pop("name", self.ext_variant.name)
self.slash_variant: BridgeSlashGroup = BridgeSlashGroup(
callback, name, *args, **kwargs
super().__init__(
callback,
ext_variant=(ext_var := BridgeExtGroup(callback, *args, **kwargs)),
slash_variant=BridgeSlashGroup(callback, ext_var.name, *args, **kwargs),
parent=kwargs.pop("parent", None),
)

self.subcommands: list[BridgeCommand] = []

self.mapped: SlashCommand | None = None
Expand Down
8 changes: 4 additions & 4 deletions discord/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,17 +1105,17 @@ def as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[list[T]]:
.. versionadded:: 2.0
.. warning::
The last chunk collected may not be as large as ``max_size``.
Parameters
----------
iterator: Union[:class:`collections.abc.Iterator`, :class:`collections.abc.AsyncIterator`]
The iterator to chunk, can be sync or async.
max_size: :class:`int`
The maximum chunk size.
.. warning::
The last chunk collected may not be as large as ``max_size``.
Returns
-------
Union[:class:`collections.abc.Iterator`, :class:`collections.abc.AsyncIterator`]
Expand Down
2 changes: 1 addition & 1 deletion docs/api/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ of :class:`enum.Enum`.
The user is an Early Verified Bot Developer.
.. attribute:: discord_certified_moderator

The user is a Discord Certified Moderator.
The user is a Moderator Programs Alumni.
.. attribute:: bot_http_interactions

The bot has set an interactions endpoint url.
Expand Down
2 changes: 1 addition & 1 deletion docs/migrating_to_v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Intents Changes

:attr:`Intents.message_content` is now a privileged intent. Disabling it causes :attr:`Message.content`,
:attr:`Message.embeds`, :attr:`Message.components`, and :attr:`Message.attachments` to be empty (an empty string
or an empty array), directly causing :class:`ext.commands.Command`s to not run.
or an empty array), directly causing :class:`ext.commands.Command` s to not run.
See `here <https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ>`_ for more information.


Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r _.txt
pylint~=2.15.8
pytest~=7.2.0
pytest-asyncio~=0.20.2
pytest-asyncio~=0.20.3
# pytest-order~=1.0.1
mypy~=0.991
coverage~=6.5
Expand Down

0 comments on commit 2f82cf0

Please sign in to comment.