members¶
-Useful helper functions for interactin with discord.Member
objects.
Useful helper functions for interactin with discord.Member
objects.
- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given coro
with role
as the sole argument.
Handle errors that we expect to be raised from
-discord.Member.add_roles
and discord.Member.remove_roles
.
discord.Member.add_roles
and discord.Member.remove_roles
.
- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.1.0/.buildinfo b/v10.1.0/.buildinfo index d34b153a..629beeef 100644 --- a/v10.1.0/.buildinfo +++ b/v10.1.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a0d98a8e3f8ea3d440d75b150af86912 +config: 35665a1bb343262893b36ff1e80214f6 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.1.0/_static/pygments.css b/v10.1.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.1.0/_static/pygments.css +++ b/v10.1.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.1.0/changelog.html b/v10.1.0/changelog.html index 40d9a77f..334b51d9 100644 --- a/v10.1.0/changelog.html +++ b/v10.1.0/changelog.html @@ -445,14 +445,14 @@
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.1.0/output/pydis_core.utils.commands.html b/v10.1.0/output/pydis_core.utils.commands.html
index c6e0e39e..c763d5af 100644
--- a/v10.1.0/output/pydis_core.utils.commands.html
+++ b/v10.1.0/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.1.0/output/pydis_core.utils.cooldown.html b/v10.1.0/output/pydis_core.utils.cooldown.html
index 809205e3..a7954878 100644
--- a/v10.1.0/output/pydis_core.utils.cooldown.html
+++ b/v10.1.0/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.1.0/output/pydis_core.utils.error_handling.html b/v10.1.0/output/pydis_core.utils.error_handling.html index f73bf3b5..afc305dd 100644 --- a/v10.1.0/output/pydis_core.utils.error_handling.html +++ b/v10.1.0/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.1.0/output/pydis_core.utils.html b/v10.1.0/output/pydis_core.utils.html index 6f37fcbd..27aa7938 100644 --- a/v10.1.0/output/pydis_core.utils.html +++ b/v10.1.0/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.1.0/output/pydis_core.utils.interactions.html b/v10.1.0/output/pydis_core.utils.interactions.html
index 4bf512a4..36542bc6 100644
--- a/v10.1.0/output/pydis_core.utils.interactions.html
+++ b/v10.1.0/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.1.0/output/pydis_core.utils.members.html b/v10.1.0/output/pydis_core.utils.members.html
index 80c65867..c1b434f0 100644
--- a/v10.1.0/output/pydis_core.utils.members.html
+++ b/v10.1.0/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.2.0/.buildinfo b/v10.2.0/.buildinfo index 524b761e..bb8034c0 100644 --- a/v10.2.0/.buildinfo +++ b/v10.2.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: bb7f4a367c2e3e78c53a35a3ab42acb0 +config: ef7b24dce75e647b3cda2c66b7a1d162 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.2.0/_static/pygments.css b/v10.2.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.2.0/_static/pygments.css +++ b/v10.2.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.2.0/changelog.html b/v10.2.0/changelog.html index c97fbe17..68f17756 100644 --- a/v10.2.0/changelog.html +++ b/v10.2.0/changelog.html @@ -450,14 +450,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.2.0/output/pydis_core.utils.commands.html b/v10.2.0/output/pydis_core.utils.commands.html
index ba5c80ba..126a5621 100644
--- a/v10.2.0/output/pydis_core.utils.commands.html
+++ b/v10.2.0/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.2.0/output/pydis_core.utils.cooldown.html b/v10.2.0/output/pydis_core.utils.cooldown.html
index a2ea4a2f..e221cb42 100644
--- a/v10.2.0/output/pydis_core.utils.cooldown.html
+++ b/v10.2.0/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.2.0/output/pydis_core.utils.error_handling.html b/v10.2.0/output/pydis_core.utils.error_handling.html index 1c8127aa..9e150873 100644 --- a/v10.2.0/output/pydis_core.utils.error_handling.html +++ b/v10.2.0/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.2.0/output/pydis_core.utils.html b/v10.2.0/output/pydis_core.utils.html index a08f384b..cc55d40f 100644 --- a/v10.2.0/output/pydis_core.utils.html +++ b/v10.2.0/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.2.0/output/pydis_core.utils.interactions.html b/v10.2.0/output/pydis_core.utils.interactions.html
index 085c5100..e3ac2cc1 100644
--- a/v10.2.0/output/pydis_core.utils.interactions.html
+++ b/v10.2.0/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.2.0/output/pydis_core.utils.members.html b/v10.2.0/output/pydis_core.utils.members.html
index 9f6ea2f7..8e8eaebc 100644
--- a/v10.2.0/output/pydis_core.utils.members.html
+++ b/v10.2.0/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.3.0/.buildinfo b/v10.3.0/.buildinfo index f1168884..d9a4c4c0 100644 --- a/v10.3.0/.buildinfo +++ b/v10.3.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b4e1e5a6d54460418d6458fb9ba23a10 +config: a27cf85598abbdc95305eae41e0d38db tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.3.0/_static/pygments.css b/v10.3.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.3.0/_static/pygments.css +++ b/v10.3.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.3.0/changelog.html b/v10.3.0/changelog.html index 53a28927..942fa2ef 100644 --- a/v10.3.0/changelog.html +++ b/v10.3.0/changelog.html @@ -456,14 +456,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.3.0/output/pydis_core.utils.commands.html b/v10.3.0/output/pydis_core.utils.commands.html
index f0018a53..dfdebe77 100644
--- a/v10.3.0/output/pydis_core.utils.commands.html
+++ b/v10.3.0/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.3.0/output/pydis_core.utils.cooldown.html b/v10.3.0/output/pydis_core.utils.cooldown.html
index 328fe81d..cc73d297 100644
--- a/v10.3.0/output/pydis_core.utils.cooldown.html
+++ b/v10.3.0/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.3.0/output/pydis_core.utils.error_handling.html b/v10.3.0/output/pydis_core.utils.error_handling.html index b11d502a..6a1d7a0a 100644 --- a/v10.3.0/output/pydis_core.utils.error_handling.html +++ b/v10.3.0/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.3.0/output/pydis_core.utils.html b/v10.3.0/output/pydis_core.utils.html index 9e044486..7f9d3692 100644 --- a/v10.3.0/output/pydis_core.utils.html +++ b/v10.3.0/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.3.0/output/pydis_core.utils.interactions.html b/v10.3.0/output/pydis_core.utils.interactions.html
index 6e7ded8a..363a32c6 100644
--- a/v10.3.0/output/pydis_core.utils.interactions.html
+++ b/v10.3.0/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.3.0/output/pydis_core.utils.members.html b/v10.3.0/output/pydis_core.utils.members.html
index 000e3ec4..d5466062 100644
--- a/v10.3.0/output/pydis_core.utils.members.html
+++ b/v10.3.0/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.4.0/.buildinfo b/v10.4.0/.buildinfo index 19a110d2..315e6eeb 100644 --- a/v10.4.0/.buildinfo +++ b/v10.4.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c519e31d7b0000950e438496bde627b7 +config: f9d4a8a34aea70db355bc1303e8cc010 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.4.0/_static/pygments.css b/v10.4.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.4.0/_static/pygments.css +++ b/v10.4.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.4.0/changelog.html b/v10.4.0/changelog.html index c11fb922..fb5d9dc6 100644 --- a/v10.4.0/changelog.html +++ b/v10.4.0/changelog.html @@ -462,14 +462,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.4.0/output/pydis_core.utils.commands.html b/v10.4.0/output/pydis_core.utils.commands.html
index 1a0b8542..d9fc72e2 100644
--- a/v10.4.0/output/pydis_core.utils.commands.html
+++ b/v10.4.0/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.4.0/output/pydis_core.utils.cooldown.html b/v10.4.0/output/pydis_core.utils.cooldown.html
index 702288d6..4d18335d 100644
--- a/v10.4.0/output/pydis_core.utils.cooldown.html
+++ b/v10.4.0/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.4.0/output/pydis_core.utils.error_handling.html b/v10.4.0/output/pydis_core.utils.error_handling.html index b05c89ab..ad922388 100644 --- a/v10.4.0/output/pydis_core.utils.error_handling.html +++ b/v10.4.0/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.4.0/output/pydis_core.utils.html b/v10.4.0/output/pydis_core.utils.html index 683e8171..84c97a89 100644 --- a/v10.4.0/output/pydis_core.utils.html +++ b/v10.4.0/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.4.0/output/pydis_core.utils.interactions.html b/v10.4.0/output/pydis_core.utils.interactions.html
index 3a32a098..fcf3826b 100644
--- a/v10.4.0/output/pydis_core.utils.interactions.html
+++ b/v10.4.0/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.4.0/output/pydis_core.utils.members.html b/v10.4.0/output/pydis_core.utils.members.html
index 2cf63996..d47c693c 100644
--- a/v10.4.0/output/pydis_core.utils.members.html
+++ b/v10.4.0/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.5.0/.buildinfo b/v10.5.0/.buildinfo index 67687d73..b84b8584 100644 --- a/v10.5.0/.buildinfo +++ b/v10.5.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 569863968293e7573b6cd264ec79c0f7 +config: 1dbeb03c6aeb38886bcb457339bd17c9 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.5.0/_static/pygments.css b/v10.5.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.5.0/_static/pygments.css +++ b/v10.5.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.5.0/changelog.html b/v10.5.0/changelog.html index b41142f7..c5bf6699 100644 --- a/v10.5.0/changelog.html +++ b/v10.5.0/changelog.html @@ -467,14 +467,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.5.0/output/pydis_core.utils.commands.html b/v10.5.0/output/pydis_core.utils.commands.html
index b6522e96..40ede432 100644
--- a/v10.5.0/output/pydis_core.utils.commands.html
+++ b/v10.5.0/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.5.0/output/pydis_core.utils.cooldown.html b/v10.5.0/output/pydis_core.utils.cooldown.html
index 06243d7e..0d607867 100644
--- a/v10.5.0/output/pydis_core.utils.cooldown.html
+++ b/v10.5.0/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.5.0/output/pydis_core.utils.error_handling.html b/v10.5.0/output/pydis_core.utils.error_handling.html index 5298962f..c35e0436 100644 --- a/v10.5.0/output/pydis_core.utils.error_handling.html +++ b/v10.5.0/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.5.0/output/pydis_core.utils.html b/v10.5.0/output/pydis_core.utils.html index bec0c9c2..ce720789 100644 --- a/v10.5.0/output/pydis_core.utils.html +++ b/v10.5.0/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.5.0/output/pydis_core.utils.interactions.html b/v10.5.0/output/pydis_core.utils.interactions.html
index 20b698f3..ad4e3b2e 100644
--- a/v10.5.0/output/pydis_core.utils.interactions.html
+++ b/v10.5.0/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.5.0/output/pydis_core.utils.members.html b/v10.5.0/output/pydis_core.utils.members.html
index 841a19ba..1be6366e 100644
--- a/v10.5.0/output/pydis_core.utils.members.html
+++ b/v10.5.0/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.5.1/.buildinfo b/v10.5.1/.buildinfo index eb9e2ae8..e4f799f8 100644 --- a/v10.5.1/.buildinfo +++ b/v10.5.1/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 7e9da2c5f131b2a9e0ca70ce3666ae8a +config: 15a5cf55e8d46f19befc7e6488c5f41b tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.5.1/_static/pygments.css b/v10.5.1/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.5.1/_static/pygments.css +++ b/v10.5.1/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.5.1/changelog.html b/v10.5.1/changelog.html index c3133ca1..ed3e6515 100644 --- a/v10.5.1/changelog.html +++ b/v10.5.1/changelog.html @@ -472,14 +472,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -479,7 +479,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.5.1/output/pydis_core.utils.commands.html b/v10.5.1/output/pydis_core.utils.commands.html
index 268ba0d5..934bd75a 100644
--- a/v10.5.1/output/pydis_core.utils.commands.html
+++ b/v10.5.1/output/pydis_core.utils.commands.html
@@ -450,12 +450,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.5.1/output/pydis_core.utils.cooldown.html b/v10.5.1/output/pydis_core.utils.cooldown.html
index 92f53655..e66d15b9 100644
--- a/v10.5.1/output/pydis_core.utils.cooldown.html
+++ b/v10.5.1/output/pydis_core.utils.cooldown.html
@@ -447,7 +447,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.5.1/output/pydis_core.utils.error_handling.html b/v10.5.1/output/pydis_core.utils.error_handling.html index bf0ac7e5..2266bf4b 100644 --- a/v10.5.1/output/pydis_core.utils.error_handling.html +++ b/v10.5.1/output/pydis_core.utils.error_handling.html @@ -450,8 +450,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.5.1/output/pydis_core.utils.html b/v10.5.1/output/pydis_core.utils.html index c66f2896..404d3d24 100644 --- a/v10.5.1/output/pydis_core.utils.html +++ b/v10.5.1/output/pydis_core.utils.html @@ -454,7 +454,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.5.1/output/pydis_core.utils.interactions.html b/v10.5.1/output/pydis_core.utils.interactions.html
index 07894851..d99d6886 100644
--- a/v10.5.1/output/pydis_core.utils.interactions.html
+++ b/v10.5.1/output/pydis_core.utils.interactions.html
@@ -446,7 +446,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -479,7 +479,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -504,7 +504,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -488,7 +488,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.5.1/output/pydis_core.utils.members.html b/v10.5.1/output/pydis_core.utils.members.html
index f55f297e..d93bfd5b 100644
--- a/v10.5.1/output/pydis_core.utils.members.html
+++ b/v10.5.1/output/pydis_core.utils.members.html
@@ -443,17 +443,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.6.0/.buildinfo b/v10.6.0/.buildinfo index 53f8223c..f3a0974a 100644 --- a/v10.6.0/.buildinfo +++ b/v10.6.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: fa82e6868e6c51f883ec36d522cef334 +config: 2a00fc8abca949bea03bd909e9b0d695 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.6.0/_static/pygments.css b/v10.6.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.6.0/_static/pygments.css +++ b/v10.6.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.6.0/changelog.html b/v10.6.0/changelog.html index 0bc2dc16..0ced18ee 100644 --- a/v10.6.0/changelog.html +++ b/v10.6.0/changelog.html @@ -482,14 +482,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -703,15 +703,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -721,7 +721,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v10.6.0/output/pydis_core.utils.channel.html b/v10.6.0/output/pydis_core.utils.channel.html index d3892743..e8791826 100644 --- a/v10.6.0/output/pydis_core.utils.channel.html +++ b/v10.6.0/output/pydis_core.utils.channel.html @@ -454,20 +454,20 @@
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -482,7 +482,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.6.0/output/pydis_core.utils.checks.html b/v10.6.0/output/pydis_core.utils.checks.html
index db1fe9f9..228232af 100644
--- a/v10.6.0/output/pydis_core.utils.checks.html
+++ b/v10.6.0/output/pydis_core.utils.checks.html
@@ -449,7 +449,7 @@
- exception ContextCheckFailure(redirect_channel)[source]¶ -
Bases:
+CheckFailure
Bases:
CheckFailure
Raised when a context-specific check fails.
- @@ -475,7 +475,7 @@
rate (int) – Number of times a command can be used before triggering a cooldown.
per (float) – The duration (in seconds) for how long the cooldown lasts.
-type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).
+type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).bypass_roles (Iterable[int]) – An iterable of role IDs that bypass the cooldown.
@@ -499,7 +499,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -520,7 +520,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -540,7 +540,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.redirect (int | None) – The channel ID to redirect the user to, if any.
channels (Container[int]) – Whitelisted channel IDs. Defaults to ().
categories (Container[int]) – Whitelisted category IDs. Defaults to ().
diff --git a/v10.6.0/output/pydis_core.utils.commands.html b/v10.6.0/output/pydis_core.utils.commands.html
index d454cb46..a50a7688 100644
--- a/v10.6.0/output/pydis_core.utils.commands.html
+++ b/v10.6.0/output/pydis_core.utils.commands.html
@@ -453,12 +453,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.6.0/output/pydis_core.utils.cooldown.html b/v10.6.0/output/pydis_core.utils.cooldown.html
index aae99238..c87a6728 100644
--- a/v10.6.0/output/pydis_core.utils.cooldown.html
+++ b/v10.6.0/output/pydis_core.utils.cooldown.html
@@ -450,7 +450,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.6.0/output/pydis_core.utils.error_handling.html b/v10.6.0/output/pydis_core.utils.error_handling.html index 17a5f25d..42390b17 100644 --- a/v10.6.0/output/pydis_core.utils.error_handling.html +++ b/v10.6.0/output/pydis_core.utils.error_handling.html @@ -453,8 +453,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.6.0/output/pydis_core.utils.html b/v10.6.0/output/pydis_core.utils.html index e6094fd1..959b4f7f 100644 --- a/v10.6.0/output/pydis_core.utils.html +++ b/v10.6.0/output/pydis_core.utils.html @@ -457,7 +457,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.6.0/output/pydis_core.utils.interactions.html b/v10.6.0/output/pydis_core.utils.interactions.html
index 9369966a..1e4642cc 100644
--- a/v10.6.0/output/pydis_core.utils.interactions.html
+++ b/v10.6.0/output/pydis_core.utils.interactions.html
@@ -449,7 +449,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -482,7 +482,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
Bases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -491,7 +491,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.
@@ -507,7 +507,7 @@ If - Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v10.6.0/output/pydis_core.utils.members.html b/v10.6.0/output/pydis_core.utils.members.html
index 03ea50e7..1891f8fc 100644
--- a/v10.6.0/output/pydis_core.utils.members.html
+++ b/v10.6.0/output/pydis_core.utils.members.html
@@ -446,17 +446,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.6.0/output/pydis_core.utils.pagination.html b/v10.6.0/output/pydis_core.utils.pagination.html index 0da58388..441512ef 100644 --- a/v10.6.0/output/pydis_core.utils.pagination.html +++ b/v10.6.0/output/pydis_core.utils.pagination.html @@ -456,7 +456,7 @@
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -520,15 +520,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -538,7 +538,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v10.7.0/.buildinfo b/v10.7.0/.buildinfo index 22a68a86..6772a5e8 100644 --- a/v10.7.0/.buildinfo +++ b/v10.7.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 36ed483a88ae18c4a691599371fae5e3 +config: 897dacf3fc437d4d89cc7988b2d15640 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v10.7.0/_static/pygments.css b/v10.7.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v10.7.0/_static/pygments.css +++ b/v10.7.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v10.7.0/changelog.html b/v10.7.0/changelog.html index 4244b2ea..b68d22ed 100644 --- a/v10.7.0/changelog.html +++ b/v10.7.0/changelog.html @@ -490,14 +490,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -704,15 +704,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -722,7 +722,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v10.7.0/output/pydis_core.utils.channel.html b/v10.7.0/output/pydis_core.utils.channel.html index ab4555df..7bc3bd29 100644 --- a/v10.7.0/output/pydis_core.utils.channel.html +++ b/v10.7.0/output/pydis_core.utils.channel.html @@ -455,20 +455,20 @@
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -483,7 +483,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v10.7.0/output/pydis_core.utils.checks.html b/v10.7.0/output/pydis_core.utils.checks.html
index 58d7beed..83526605 100644
--- a/v10.7.0/output/pydis_core.utils.checks.html
+++ b/v10.7.0/output/pydis_core.utils.checks.html
@@ -450,7 +450,7 @@
- exception ContextCheckFailure(redirect_channel)[source]¶ -
Bases:
+CheckFailure
Bases:
CheckFailure
Raised when a context-specific check fails.
- @@ -476,7 +476,7 @@
rate (int) – Number of times a command can be used before triggering a cooldown.
per (float) – The duration (in seconds) for how long the cooldown lasts.
-type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).
+type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).bypass_roles (Iterable[int]) – An iterable of role IDs that bypass the cooldown.
@@ -500,7 +500,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -521,7 +521,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -541,7 +541,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.redirect (int | None) – The channel ID to redirect the user to, if any.
channels (Container[int]) – Whitelisted channel IDs. Defaults to ().
categories (Container[int]) – Whitelisted category IDs. Defaults to ().
diff --git a/v10.7.0/output/pydis_core.utils.commands.html b/v10.7.0/output/pydis_core.utils.commands.html
index d74bb9ef..389371ec 100644
--- a/v10.7.0/output/pydis_core.utils.commands.html
+++ b/v10.7.0/output/pydis_core.utils.commands.html
@@ -454,12 +454,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v10.7.0/output/pydis_core.utils.cooldown.html b/v10.7.0/output/pydis_core.utils.cooldown.html
index f22ffba0..2e1ac03f 100644
--- a/v10.7.0/output/pydis_core.utils.cooldown.html
+++ b/v10.7.0/output/pydis_core.utils.cooldown.html
@@ -451,7 +451,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v10.7.0/output/pydis_core.utils.error_handling.html b/v10.7.0/output/pydis_core.utils.error_handling.html index 4775ce4b..9e293354 100644 --- a/v10.7.0/output/pydis_core.utils.error_handling.html +++ b/v10.7.0/output/pydis_core.utils.error_handling.html @@ -454,8 +454,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v10.7.0/output/pydis_core.utils.html b/v10.7.0/output/pydis_core.utils.html index aeb10354..e4d1ba63 100644 --- a/v10.7.0/output/pydis_core.utils.html +++ b/v10.7.0/output/pydis_core.utils.html @@ -458,7 +458,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v10.7.0/output/pydis_core.utils.interactions.html b/v10.7.0/output/pydis_core.utils.interactions.html
index f0e0f43e..9da9dd07 100644
--- a/v10.7.0/output/pydis_core.utils.interactions.html
+++ b/v10.7.0/output/pydis_core.utils.interactions.html
@@ -450,7 +450,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -483,7 +483,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
Bases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -492,7 +492,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.
@@ -508,7 +508,7 @@ If - Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
@@ -547,7 +547,7 @@ If
None
- Parameters:
-
-
- +
allowed_users (
Sequence
[int
]) – A sequence of user ids that are allowed accessallowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed access
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v10.7.0/output/pydis_core.utils.pagination.html b/v10.7.0/output/pydis_core.utils.pagination.html index 6c836c12..af469285 100644 --- a/v10.7.0/output/pydis_core.utils.pagination.html +++ b/v10.7.0/output/pydis_core.utils.pagination.html @@ -457,7 +457,7 @@
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -521,15 +521,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -539,7 +539,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.0.0/.buildinfo b/v11.0.0/.buildinfo index 6cd702f8..a5dbf140 100644 --- a/v11.0.0/.buildinfo +++ b/v11.0.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 91cd4ad417882b671db38c6728d00fe0 +config: 7488b03904f563e61a9f87d0ef998e9f tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v11.0.0/_static/pygments.css b/v11.0.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v11.0.0/_static/pygments.css +++ b/v11.0.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v11.0.0/changelog.html b/v11.0.0/changelog.html index f18ac7e3..9605f65c 100644 --- a/v11.0.0/changelog.html +++ b/v11.0.0/changelog.html @@ -510,14 +510,14 @@
10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -802,15 +802,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -820,7 +820,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.0.0/output/pydis_core.utils.channel.html b/v11.0.0/output/pydis_core.utils.channel.html index e2f65c27..7514eab8 100644 --- a/v11.0.0/output/pydis_core.utils.channel.html +++ b/v11.0.0/output/pydis_core.utils.channel.html @@ -462,20 +462,20 @@
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -490,7 +490,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v11.0.0/output/pydis_core.utils.checks.html b/v11.0.0/output/pydis_core.utils.checks.html
index a86eecb5..57458343 100644
--- a/v11.0.0/output/pydis_core.utils.checks.html
+++ b/v11.0.0/output/pydis_core.utils.checks.html
@@ -457,7 +457,7 @@
- exception ContextCheckFailure(redirect_channel)[source]¶ -
Bases:
+CheckFailure
Bases:
CheckFailure
Raised when a context-specific check fails.
- @@ -483,7 +483,7 @@
rate (int) – Number of times a command can be used before triggering a cooldown.
per (float) – The duration (in seconds) for how long the cooldown lasts.
-type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).
+type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).bypass_roles (Iterable[int]) – An iterable of role IDs that bypass the cooldown.
@@ -507,7 +507,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -528,7 +528,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -548,7 +548,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.redirect (int | None) – The channel ID to redirect the user to, if any.
channels (Container[int]) – Whitelisted channel IDs. Defaults to ().
categories (Container[int]) – Whitelisted category IDs. Defaults to ().
diff --git a/v11.0.0/output/pydis_core.utils.commands.html b/v11.0.0/output/pydis_core.utils.commands.html
index 789892b3..6a7fb04a 100644
--- a/v11.0.0/output/pydis_core.utils.commands.html
+++ b/v11.0.0/output/pydis_core.utils.commands.html
@@ -461,12 +461,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v11.0.0/output/pydis_core.utils.cooldown.html b/v11.0.0/output/pydis_core.utils.cooldown.html
index 607a8fbe..0171d7b0 100644
--- a/v11.0.0/output/pydis_core.utils.cooldown.html
+++ b/v11.0.0/output/pydis_core.utils.cooldown.html
@@ -458,7 +458,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v11.0.0/output/pydis_core.utils.error_handling.html b/v11.0.0/output/pydis_core.utils.error_handling.html index 88fef77a..1e154bb2 100644 --- a/v11.0.0/output/pydis_core.utils.error_handling.html +++ b/v11.0.0/output/pydis_core.utils.error_handling.html @@ -461,8 +461,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v11.0.0/output/pydis_core.utils.html b/v11.0.0/output/pydis_core.utils.html index 29b23f70..4b8f04b7 100644 --- a/v11.0.0/output/pydis_core.utils.html +++ b/v11.0.0/output/pydis_core.utils.html @@ -465,7 +465,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v11.0.0/output/pydis_core.utils.interactions.html b/v11.0.0/output/pydis_core.utils.interactions.html
index 275d3b34..d18dde7e 100644
--- a/v11.0.0/output/pydis_core.utils.interactions.html
+++ b/v11.0.0/output/pydis_core.utils.interactions.html
@@ -457,7 +457,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -490,7 +490,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
Bases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -499,7 +499,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.
@@ -515,7 +515,7 @@ If - Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
@@ -554,7 +554,7 @@ If
None
- Parameters:
-
-
- +
allowed_users (
Sequence
[int
]) – A sequence of user ids that are allowed accessallowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed access
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v11.0.0/output/pydis_core.utils.pagination.html b/v11.0.0/output/pydis_core.utils.pagination.html index d86fed9f..3601b3ed 100644 --- a/v11.0.0/output/pydis_core.utils.pagination.html +++ b/v11.0.0/output/pydis_core.utils.pagination.html @@ -464,7 +464,7 @@
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -528,15 +528,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -546,7 +546,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.0.1/.buildinfo b/v11.0.1/.buildinfo index 6e3c3dd2..c4cc9723 100644 --- a/v11.0.1/.buildinfo +++ b/v11.0.1/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 2aefbdfa8f6a1674d8da448a17b2d057 +config: bb541a4ade3412407beb8e5bbd7790b0 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v11.0.1/_static/pygments.css b/v11.0.1/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v11.0.1/_static/pygments.css +++ b/v11.0.1/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v11.0.1/changelog.html b/v11.0.1/changelog.html index 5c089145..3cc71b09 100644 --- a/v11.0.1/changelog.html +++ b/v11.0.1/changelog.html @@ -456,7 +456,7 @@
Changelog¶
11.0.1 20th March 2024
-
-
[Bug] #209: Extract original error from
discord.ext.commands.errors.CommandInvokeError
before handling it.
+[Bug] #209: Extract original error from
discord.ext.commands.errors.CommandInvokeError
before handling it.
@@ -515,14 +515,14 @@ 10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -802,15 +802,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -820,7 +820,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.0.1/output/pydis_core.utils.channel.html b/v11.0.1/output/pydis_core.utils.channel.html index bf6dd269..9e6b61a5 100644 --- a/v11.0.1/output/pydis_core.utils.channel.html +++ b/v11.0.1/output/pydis_core.utils.channel.html @@ -462,20 +462,20 @@
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -490,7 +490,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v11.0.1/output/pydis_core.utils.checks.html b/v11.0.1/output/pydis_core.utils.checks.html
index 81006f5b..7f116efb 100644
--- a/v11.0.1/output/pydis_core.utils.checks.html
+++ b/v11.0.1/output/pydis_core.utils.checks.html
@@ -457,7 +457,7 @@
- exception ContextCheckFailure(redirect_channel)[source]¶ -
Bases:
+CheckFailure
Bases:
CheckFailure
Raised when a context-specific check fails.
- @@ -483,7 +483,7 @@
rate (int) – Number of times a command can be used before triggering a cooldown.
per (float) – The duration (in seconds) for how long the cooldown lasts.
-type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).
+type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).bypass_roles (Iterable[int]) – An iterable of role IDs that bypass the cooldown.
@@ -507,7 +507,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -528,7 +528,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -548,7 +548,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.redirect (int | None) – The channel ID to redirect the user to, if any.
channels (Container[int]) – Whitelisted channel IDs. Defaults to ().
categories (Container[int]) – Whitelisted category IDs. Defaults to ().
diff --git a/v11.0.1/output/pydis_core.utils.commands.html b/v11.0.1/output/pydis_core.utils.commands.html
index dce537ca..26694ec3 100644
--- a/v11.0.1/output/pydis_core.utils.commands.html
+++ b/v11.0.1/output/pydis_core.utils.commands.html
@@ -461,12 +461,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v11.0.1/output/pydis_core.utils.cooldown.html b/v11.0.1/output/pydis_core.utils.cooldown.html
index dda27700..3f430e9e 100644
--- a/v11.0.1/output/pydis_core.utils.cooldown.html
+++ b/v11.0.1/output/pydis_core.utils.cooldown.html
@@ -458,7 +458,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v11.0.1/output/pydis_core.utils.error_handling.html b/v11.0.1/output/pydis_core.utils.error_handling.html index 5b690b76..63bdee81 100644 --- a/v11.0.1/output/pydis_core.utils.error_handling.html +++ b/v11.0.1/output/pydis_core.utils.error_handling.html @@ -461,8 +461,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v11.0.1/output/pydis_core.utils.html b/v11.0.1/output/pydis_core.utils.html index b2311e66..5e34bc8f 100644 --- a/v11.0.1/output/pydis_core.utils.html +++ b/v11.0.1/output/pydis_core.utils.html @@ -465,7 +465,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v11.0.1/output/pydis_core.utils.interactions.html b/v11.0.1/output/pydis_core.utils.interactions.html
index 49f926b1..59450129 100644
--- a/v11.0.1/output/pydis_core.utils.interactions.html
+++ b/v11.0.1/output/pydis_core.utils.interactions.html
@@ -457,7 +457,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -490,7 +490,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
Bases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -499,7 +499,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.
@@ -515,7 +515,7 @@ If - Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
@@ -554,7 +554,7 @@ If
None
- Parameters:
-
-
- +
allowed_users (
Sequence
[int
]) – A sequence of user ids that are allowed accessallowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed access
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v11.0.1/output/pydis_core.utils.pagination.html b/v11.0.1/output/pydis_core.utils.pagination.html index c9bea13b..0172bb6d 100644 --- a/v11.0.1/output/pydis_core.utils.pagination.html +++ b/v11.0.1/output/pydis_core.utils.pagination.html @@ -464,7 +464,7 @@
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -528,15 +528,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -546,7 +546,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.1.0/.buildinfo b/v11.1.0/.buildinfo index a6e0544b..6cbd4bec 100644 --- a/v11.1.0/.buildinfo +++ b/v11.1.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: df6a2276850fa75f69335d64320ce258 +config: b6edd41cffb3f869cb40664d74d5950a tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v11.1.0/_static/pygments.css b/v11.1.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v11.1.0/_static/pygments.css +++ b/v11.1.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v11.1.0/changelog.html b/v11.1.0/changelog.html index a7d03045..68c888bd 100644 --- a/v11.1.0/changelog.html +++ b/v11.1.0/changelog.html @@ -461,7 +461,7 @@
11.0.1 20th March 2024
-
-
[Bug] #209: Extract original error from
discord.ext.commands.errors.CommandInvokeError
before handling it.
+[Bug] #209: Extract original error from
discord.ext.commands.errors.CommandInvokeError
before handling it.
@@ -520,14 +520,14 @@ 10.1.0 25th July 2023
-
-
[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
+[Feature] #190: Overwrite
discord.ext.commands.Bot.process_commands
to ensure no commands are processed until all extensions are loaded. This only works for clients usingpydis_core.BotBase.load_extensions
.
10.0.0 14th July 2023
[Breaking] #188: Support sending multiple files at once to paste service. All calls to
pydis_core.utils.paste_service.send_to_paste_service
must now provide a list ofpydis_core.utils.paste_service.PasteFile
.[Feature] #184: Remove the message stored in the
message
attr ofpydis_core.utils.interactions.ViewWithUserAndRoleCheck
when the interaction is stopped, in additional to the exist logic for timeout.
-[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
+[Bug] #187: Fix
pydis_core.utils.channel.get_or_fetch_channel
’s return type to includediscord.abc.PrivateChannel
anddiscord.Thread
.
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -802,15 +802,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -820,7 +820,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v11.1.0/output/pydis_core.utils.channel.html b/v11.1.0/output/pydis_core.utils.channel.html index d25c12a6..7734a89f 100644 --- a/v11.1.0/output/pydis_core.utils.channel.html +++ b/v11.1.0/output/pydis_core.utils.channel.html @@ -462,20 +462,20 @@
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
+GuildChannel
|PrivateChannel
|Thread
- Returns:
The channel from the ID.
@@ -490,7 +490,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v11.1.0/output/pydis_core.utils.checks.html b/v11.1.0/output/pydis_core.utils.checks.html
index d2e58a9b..4eb4c325 100644
--- a/v11.1.0/output/pydis_core.utils.checks.html
+++ b/v11.1.0/output/pydis_core.utils.checks.html
@@ -457,7 +457,7 @@
- exception ContextCheckFailure(redirect_channel)[source]¶ -
Bases:
+CheckFailure
Bases:
CheckFailure
Raised when a context-specific check fails.
- @@ -483,7 +483,7 @@
rate (int) – Number of times a command can be used before triggering a cooldown.
per (float) – The duration (in seconds) for how long the cooldown lasts.
-type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).
+type (
discord.ext.commands.BucketType
) – The type of cooldown (per user, per channel, per guild, etc.).bypass_roles (Iterable[int]) – An iterable of role IDs that bypass the cooldown.
@@ -507,7 +507,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -528,7 +528,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context where the command is being invoked.
@@ -548,7 +548,7 @@
- Parameters:
-
-
ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.
+ctx (
discord.ext.commands.Context
) – The context in which the command is being invoked.redirect (int | None) – The channel ID to redirect the user to, if any.
channels (Container[int]) – Whitelisted channel IDs. Defaults to ().
categories (Container[int]) – Whitelisted category IDs. Defaults to ().
diff --git a/v11.1.0/output/pydis_core.utils.commands.html b/v11.1.0/output/pydis_core.utils.commands.html
index 32c7f12a..d2516871 100644
--- a/v11.1.0/output/pydis_core.utils.commands.html
+++ b/v11.1.0/output/pydis_core.utils.commands.html
@@ -461,12 +461,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v11.1.0/output/pydis_core.utils.cooldown.html b/v11.1.0/output/pydis_core.utils.cooldown.html
index 48d6bbe6..6893e60b 100644
--- a/v11.1.0/output/pydis_core.utils.cooldown.html
+++ b/v11.1.0/output/pydis_core.utils.cooldown.html
@@ -458,7 +458,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v11.1.0/output/pydis_core.utils.error_handling.html b/v11.1.0/output/pydis_core.utils.error_handling.html index 0df06b01..f431751e 100644 --- a/v11.1.0/output/pydis_core.utils.error_handling.html +++ b/v11.1.0/output/pydis_core.utils.error_handling.html @@ -461,8 +461,8 @@
- Parameters:
-
-
error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
-message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
+error (
Forbidden
) – The raiseddiscord.Forbidden
to check.
+message (
Message
|None
) – The message to reply to and include in logs, if error is 90001 and message is provided.
- Return type: diff --git a/v11.1.0/output/pydis_core.utils.html b/v11.1.0/output/pydis_core.utils.html index 4617be91..7879bc53 100644 --- a/v11.1.0/output/pydis_core.utils.html +++ b/v11.1.0/output/pydis_core.utils.html @@ -465,7 +465,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v11.1.0/output/pydis_core.utils.interactions.html b/v11.1.0/output/pydis_core.utils.interactions.html
index f6a53e57..8c63983c 100644
--- a/v11.1.0/output/pydis_core.utils.interactions.html
+++ b/v11.1.0/output/pydis_core.utils.interactions.html
@@ -457,7 +457,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -490,7 +490,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
Bases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -499,7 +499,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
float
|None
) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Message
|None
) – The message to remove the view from on timeout. This can also be set with +message (
Message
|None
) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.
@@ -515,7 +515,7 @@ If - Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
@@ -554,7 +554,7 @@ If
None
- Parameters:
-
-
- +
allowed_users (
Sequence
[int
]) – A sequence of user ids that are allowed accessallowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed access
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v11.1.0/output/pydis_core.utils.pagination.html b/v11.1.0/output/pydis_core.utils.pagination.html index ad5549c0..b293d6e1 100644 --- a/v11.1.0/output/pydis_core.utils.pagination.html +++ b/v11.1.0/output/pydis_core.utils.pagination.html @@ -464,7 +464,7 @@
- class LinePaginator(prefix='```', suffix='```', max_size=4000, scale_to_size=4000, max_lines=None, linesep='\\n')[source]¶ -
Bases:
+Paginator
Bases:
Paginator
A class that aids in paginating code blocks for Discord messages.
- Parameters: @@ -528,15 +528,15 @@ to any user with a moderation role.
pagination_emojis (PaginationEmojis) – The emojis used to navigate pages.
lines (list[str]) – A list of lines to be added to the paginated content.
-ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
-embed (
discord.Embed
) – The embed that holds the content, it serves as the page.
+ctx (
discord.ext.commands.Context
) – The context in which the pagination is needed.
+embed (
discord.Embed
) – The embed that holds the content, it serves as the page.prefix (str) – The prefix inserted to every page. e.g. three backticks.
suffix (str) – The suffix appended at the end of every page. e.g. three backticks.
max_lines (int) – The maximum amount of lines allowed in a page.
max_size (int) – The maximum amount of codepoints allowed in a page.
scale_to_size (int) – The maximum amount of characters a single line can scale up to.
empty (bool) – Indicates whether an empty line should be added to each provided line.
-restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.
+restrict_to_user (
discord.User
) – The user to whom interaction with the pages should be restricted.timeout (int) – The timeout after which users cannot change pages anymore.
footer_text (str) – Text to be added as a footer for each page.
url (str) – The url to be set for the pagination embed.
@@ -546,7 +546,7 @@ to any user with a moderation role.
- Return type: -
-
+
Example: diff --git a/v9.0.0/.buildinfo b/v9.0.0/.buildinfo index 7a737ccc..493185e2 100644 --- a/v9.0.0/.buildinfo +++ b/v9.0.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 9d086995c5518d085b782e06384010d9 +config: f5c35143c13b1df19f429d8fbbc5febc tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v9.0.0/_static/pygments.css b/v9.0.0/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v9.0.0/_static/pygments.css +++ b/v9.0.0/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v9.0.0/output/pydis_core.html b/v9.0.0/output/pydis_core.html index d61f3fcb..19b5604f 100644 --- a/v9.0.0/output/pydis_core.html +++ b/v9.0.0/output/pydis_core.html @@ -445,7 +445,7 @@
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
-
+
- Returns:
The channel from the ID.
@@ -477,7 +477,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v9.0.0/output/pydis_core.utils.commands.html b/v9.0.0/output/pydis_core.utils.commands.html
index 40879f7b..ce47eada 100644
--- a/v9.0.0/output/pydis_core.utils.commands.html
+++ b/v9.0.0/output/pydis_core.utils.commands.html
@@ -448,12 +448,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v9.0.0/output/pydis_core.utils.cooldown.html b/v9.0.0/output/pydis_core.utils.cooldown.html
index fa3782ab..dff6c4c4 100644
--- a/v9.0.0/output/pydis_core.utils.cooldown.html
+++ b/v9.0.0/output/pydis_core.utils.cooldown.html
@@ -445,7 +445,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v9.0.0/output/pydis_core.utils.html b/v9.0.0/output/pydis_core.utils.html index 8f25224d..073e6baf 100644 --- a/v9.0.0/output/pydis_core.utils.html +++ b/v9.0.0/output/pydis_core.utils.html @@ -452,7 +452,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v9.0.0/output/pydis_core.utils.interactions.html b/v9.0.0/output/pydis_core.utils.interactions.html
index ebe83b81..e978aaaa 100644
--- a/v9.0.0/output/pydis_core.utils.interactions.html
+++ b/v9.0.0/output/pydis_core.utils.interactions.html
@@ -444,7 +444,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -477,7 +477,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -502,7 +502,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -486,7 +486,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
Optional
[float
]) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Optional
[Message
]) – The message to remove the view from on timeout. This can also be set with +message (
Optional
[Message
]) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v9.0.0/output/pydis_core.utils.members.html b/v9.0.0/output/pydis_core.utils.members.html
index e3ca6742..8b6def53 100644
--- a/v9.0.0/output/pydis_core.utils.members.html
+++ b/v9.0.0/output/pydis_core.utils.members.html
@@ -441,17 +441,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.- async get_or_fetch_member(guild, member_id)[source]¶
Attempt to get a member from cache; on failure fetch from the API.
- Return type: -
-
+
- Returns: -
The
+discord.Member
orNone
to indicate the member could not be found.The
discord.Member
orNone
to indicate the member could not be found.
Await the given
coro
withrole
as the sole argument.Handle errors that we expect to be raised from -
+discord.Member.add_roles
anddiscord.Member.remove_roles
.discord.Member.add_roles
anddiscord.Member.remove_roles
.- Parameters:
-
-
member (
Member
) – The member that is being modified for logging purposes.
-coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
-role (
Role
) – The role to be passed tocoro
.
+member (
Member
) – The member that is being modified for logging purposes.
+coro (
Callable
[[Role
],Coroutine
]) – This is intended to bediscord.Member.add_roles
ordiscord.Member.remove_roles
.
+role (
Role
) – The role to be passed tocoro
.
- Return type: diff --git a/v9.1.1/.buildinfo b/v9.1.1/.buildinfo index 7f75efb2..8d1f0136 100644 --- a/v9.1.1/.buildinfo +++ b/v9.1.1/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a2a22f279cc6250d200b2a5c018604dd +config: 93806ffadab1e61141eb1136bdfc05ca tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v9.1.1/_static/pygments.css b/v9.1.1/_static/pygments.css index c2e07c71..02b4b128 100644 --- a/v9.1.1/_static/pygments.css +++ b/v9.1.1/_static/pygments.css @@ -106,17 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -192,17 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/v9.1.1/output/pydis_core.html b/v9.1.1/output/pydis_core.html index afb8cecd..e61cd276 100644 --- a/v9.1.1/output/pydis_core.html +++ b/v9.1.1/output/pydis_core.html @@ -445,7 +445,7 @@
- class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶ -
Bases:
+Bot
Bases:
Bot
A sub-class that implements many common features that Python Discord bots use.
- Parameters:
-
-
bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.
+bot (
Bot
) – Thediscord.ext.commands.Bot
instance to use for getting/fetching.channel_id (
int
) – The channel to get/fetch.
- Raises:
-
-
discord.InvalidData – An unknown channel type was received from Discord.
-discord.HTTPException – Retrieving the channel failed.
-discord.NotFound – Invalid Channel ID.
-discord.Forbidden – You do not have permission to fetch this channel.
+discord.InvalidData – An unknown channel type was received from Discord.
+discord.HTTPException – Retrieving the channel failed.
+discord.NotFound – Invalid Channel ID.
+discord.Forbidden – You do not have permission to fetch this channel.
- Return type: -
-
+
- Returns:
The channel from the ID.
@@ -477,7 +477,7 @@- Parameters:
-
-
channel (
TextChannel
) – The channel to check.
+channel (
TextChannel
) – The channel to check.category_id (
int
) – The category to check for.
diff --git a/v9.1.1/output/pydis_core.utils.commands.html b/v9.1.1/output/pydis_core.utils.commands.html
index 6375bf9a..0307bc38 100644
--- a/v9.1.1/output/pydis_core.utils.commands.html
+++ b/v9.1.1/output/pydis_core.utils.commands.html
@@ -448,12 +448,12 @@
- Parameters:
- Raises: -
discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
+discord.ext.commands.BadArgument – text wasn’t provided and there’s no reply message / reply message content.
- Return type:
-
diff --git a/v9.1.1/output/pydis_core.utils.cooldown.html b/v9.1.1/output/pydis_core.utils.cooldown.html
index 2bc594eb..44eed9c4 100644
--- a/v9.1.1/output/pydis_core.utils.cooldown.html
+++ b/v9.1.1/output/pydis_core.utils.cooldown.html
@@ -445,7 +445,7 @@
- exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶ -
Bases:
+CommandError
,Generic
[P
,R
]Bases:
CommandError
,Generic
[P
,R
]Raised when a command is invoked while on cooldown.
- diff --git a/v9.1.1/output/pydis_core.utils.html b/v9.1.1/output/pydis_core.utils.html index f6b5b737..4f6c8b6d 100644 --- a/v9.1.1/output/pydis_core.utils.html +++ b/v9.1.1/output/pydis_core.utils.html @@ -452,7 +452,7 @@
-
-
- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names +- Patches
discord.ext.commands.Command
anddiscord.ext.commands.Group
to support root aliases. A
root_aliases
keyword argument is added to these two objects, which is a sequence of alias names that will act as top-level groups rather than being aliases of the command’s group.It’s stored as an attribute also named
root_aliases
diff --git a/v9.1.1/output/pydis_core.utils.interactions.html b/v9.1.1/output/pydis_core.utils.interactions.html
index ba8d0218..47c681e2 100644
--- a/v9.1.1/output/pydis_core.utils.interactions.html
+++ b/v9.1.1/output/pydis_core.utils.interactions.html
@@ -444,7 +444,7 @@
- class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶ -
Bases:
+Button
Bases:
Button
A button that can be added to a view to delete the message containing the view on click.
This button itself carries out no interaction checks, these should be done by the parent view.
See
@@ -477,7 +477,7 @@pydis_core.utils.interactions.ViewWithUserAndRoleCheck
for a view that implements basic checks.- class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶ -
Bases:
+View
@@ -502,7 +502,7 @@ IfBases:
View
A view that allows the original invoker and moderators to interact with it.
- Parameters: @@ -486,7 +486,7 @@
allowed_roles (
Sequence
[int
]) – A sequence of role ids that are allowed to interact with the view. -timeout (
Optional
[float
]) – Timeout in seconds from last interaction with the UI before no longer accepting input. IfNone
then there is no timeout.message (
Optional
[Message
]) – The message to remove the view from on timeout. This can also be set with +message (
Optional
[Message
]) – The message to remove the view from on timeout. This can also be set withview.message = await ctx.send( ... )`
, or similar, after the view is instantiated.None
Ensure the user clicking the button is the view invoker, or a moderator.
- Parameters: -
interaction (
+Interaction
) – The interaction that occurred.interaction (
Interaction
) – The interaction that occurred.- Return type:
-
diff --git a/v9.1.1/output/pydis_core.utils.members.html b/v9.1.1/output/pydis_core.utils.members.html
index c3667e83..84378327 100644
--- a/v9.1.1/output/pydis_core.utils.members.html
+++ b/v9.1.1/output/pydis_core.utils.members.html
@@ -441,17 +441,17 @@
members¶
-Useful helper functions for interactin with
+discord.Member
objects.Useful helper functions for interactin with
discord.Member
objects.
None
Ensure the user clicking the button is the view invoker, or a moderator.
None
Ensure the user clicking the button is the view invoker, or a moderator.
None
Ensure the user clicking the button is the view invoker, or a moderator.
None
Ensure the user clicking the button is the view invoker, or a moderator.
None
Ensure the user clicking the button is the view invoker, or a moderator.
Changelog¶
10.1.0 25th July 2023
-
-