diff --git a/changelog/1045.bugfix.rst b/changelog/1045.bugfix.rst index baa41c937a..47de7a7283 100644 --- a/changelog/1045.bugfix.rst +++ b/changelog/1045.bugfix.rst @@ -1 +1 @@ -|commands| Fix incorrect typings of :meth:`~disnake.ext.commands.InvokableApplicationCommand.add_check`, :meth:`~disnake.ext.commands.InvokableApplicationCommand.remove_check`, :meth:`~disnake.ext.commands.InteractionBotBase.add_app_command_check` and :meth:`~disnake.ext.commands.InteractionBotBase.remove_app_command_check`. +|commands| Fix incorrect typings of :meth:`InvokableApplicationCommand.add_check <.ext.commands.InvokableApplicationCommand.add_check>`, :meth:`InvokableApplicationCommand.remove_check <.ext.commands.InvokableApplicationCommand.remove_check>`, :meth:`Bot.add_app_command_check <.ext.commands.Bot.add_app_command_check>` and :meth:`Bot.remove_app_command_check <.ext.commands.Bot.remove_app_command_check>`. diff --git a/changelog/1111.bugfix.rst b/changelog/1111.bugfix.rst index 4efa8693ed..e4db7af3b1 100644 --- a/changelog/1111.bugfix.rst +++ b/changelog/1111.bugfix.rst @@ -1 +1 @@ -Allow ``cls`` argument in select menu decorators (e.g. :func`ui.string_select`) to be specified by keyword instead of being positional-only. +Allow ``cls`` argument in select menu decorators (e.g. :func:`ui.string_select`) to be specified by keyword instead of being positional-only. diff --git a/disnake/abc.py b/disnake/abc.py index fda31ec5fb..55c9ee3f78 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1297,12 +1297,6 @@ async def create_invite( max_age: :class:`int` How long the invite should last in seconds. If set to ``0``, then the invite doesn't expire. Defaults to ``0``. - - .. warning:: - - If the guild is not a Community guild (has ``COMMUNITY`` in :attr:`.Guild.features`), - this must be set to a number between ``1`` and ``2592000`` seconds. - max_uses: :class:`int` How many uses the invite could be used for. If it's 0 then there are unlimited uses. Defaults to ``0``. diff --git a/disnake/ext/commands/common_bot_base.py b/disnake/ext/commands/common_bot_base.py index 737736c170..8658aa369a 100644 --- a/disnake/ext/commands/common_bot_base.py +++ b/disnake/ext/commands/common_bot_base.py @@ -162,6 +162,10 @@ def add_cog(self, cog: Cog, *, override: bool = False) -> None: A cog is a class that has its own event listeners and commands. + This automatically re-syncs application commands, provided that + :attr:`command_sync_flags.sync_on_cog_actions <.CommandSyncFlags.sync_on_cog_actions>` + isn't disabled. + .. versionchanged:: 2.0 :exc:`.ClientException` is raised when a cog with the same name @@ -228,6 +232,10 @@ def remove_cog(self, name: str) -> Optional[Cog]: If no cog is found then this method has no effect. + This automatically re-syncs application commands, provided that + :attr:`command_sync_flags.sync_on_cog_actions <.CommandSyncFlags.sync_on_cog_actions>` + isn't disabled. + Parameters ---------- name: :class:`str` diff --git a/disnake/threads.py b/disnake/threads.py index fb0b2add92..52810b9f64 100644 --- a/disnake/threads.py +++ b/disnake/threads.py @@ -831,7 +831,7 @@ async def remove_user(self, user: Snowflake) -> None: Parameters ---------- user: :class:`abc.Snowflake` - The user to add to the thread. + The user to remove from the thread. Raises ------ diff --git a/disnake/ui/select/role.py b/disnake/ui/select/role.py index fe2da2f97a..f3dbec4b17 100644 --- a/disnake/ui/select/role.py +++ b/disnake/ui/select/role.py @@ -23,7 +23,7 @@ class RoleSelect(BaseSelect[RoleSelectMenu, "Role", V_co]): - """Represents a UI user select menu. + """Represents a UI role select menu. This is usually represented as a drop down menu.