Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add disclaimer about creating >30d invites #1056

Merged
merged 8 commits into from Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/1056.doc.rst
@@ -0,0 +1 @@
Add note to :attr:`GuildChannel.create_invite <.abc.GuildChannel.create_invite>` and all subclasses about the new 30 day expiration limit imposed for non-community guilds.
6 changes: 6 additions & 0 deletions disnake/abc.py
Expand Up @@ -1290,6 +1290,12 @@ async def create_invite(
max_age: :class:`int`
How long the invite should last in seconds. If it's 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 time between ``0`` and ``2592000`` seconds.
onerandomusername marked this conversation as resolved.
Show resolved Hide resolved

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``.
Expand Down