From 3703f491e58de299c8811dfb1fea54a827a721e9 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 16:20:50 -0400 Subject: [PATCH 1/7] docs: add disclaimer about creating long invites --- disnake/abc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/disnake/abc.py b/disnake/abc.py index 980a0ccb06..eed6463e89 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1290,9 +1290,16 @@ 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 ``2_592_000`` 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``. + temporary: :class:`bool` Whether the invite grants temporary membership (i.e. they get kicked after they disconnect). Defaults to ``False``. From d0fbfad3f31c29dca2f7e81b92d4f39ef552c748 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 16:25:44 -0400 Subject: [PATCH 2/7] docs: add changelog --- changelog/1056.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1056.doc.rst diff --git a/changelog/1056.doc.rst b/changelog/1056.doc.rst new file mode 100644 index 0000000000..94d9af776c --- /dev/null +++ b/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. From 9fef8f2cb74c76c4c1bff54a0558c750bacc364f Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 16:56:30 -0400 Subject: [PATCH 3/7] commas --- disnake/abc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/disnake/abc.py b/disnake/abc.py index eed6463e89..f63b7d94bf 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1294,8 +1294,7 @@ async def create_invite( .. 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 ``2_592_000`` seconds. - + this must be set to a time between ``0`` and ``2,592,000`` 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``. From e16ea2a95206e1193563f50cc91fb9feea783da3 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 17:05:01 -0400 Subject: [PATCH 4/7] remove accidently edited line --- disnake/abc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/disnake/abc.py b/disnake/abc.py index f63b7d94bf..daee3d466c 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1298,7 +1298,6 @@ async def create_invite( 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``. - temporary: :class:`bool` Whether the invite grants temporary membership (i.e. they get kicked after they disconnect). Defaults to ``False``. From 8453d33e71808739ac50db537f0332f177d12829 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 17:05:23 -0400 Subject: [PATCH 5/7] chore: remove commas for consistency --- disnake/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/abc.py b/disnake/abc.py index daee3d466c..0c049c26b1 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1294,7 +1294,7 @@ async def create_invite( .. 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 ``2,592,000`` seconds. + this must be set to a time between ``0`` 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``. From 58dbedb4865dbed4067c073191573d3fa2dfc43a Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Sun, 18 Jun 2023 17:08:32 -0400 Subject: [PATCH 6/7] nit: add newline --- disnake/abc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/disnake/abc.py b/disnake/abc.py index 0c049c26b1..4dc8cd29d5 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1295,6 +1295,7 @@ async def create_invite( 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. + 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``. From fe7e8d3f0a889daa0058ebcad9fc322276326a88 Mon Sep 17 00:00:00 2001 From: arl Date: Sun, 18 Jun 2023 17:34:46 -0400 Subject: [PATCH 7/7] Update disnake/abc.py Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com> Signed-off-by: arl --- disnake/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/abc.py b/disnake/abc.py index 4dc8cd29d5..879577abb8 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -1294,7 +1294,7 @@ async def create_invite( .. 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. + this must be set to a time between ``1`` and ``2592000`` seconds. max_uses: :class:`int` How many uses the invite could be used for. If it's 0 then there