From 574f77ba8e2d1f1640ac0318b992758d3197abbe Mon Sep 17 00:00:00 2001 From: wookie184 Date: Sun, 19 May 2024 01:32:44 +0000 Subject: Deploying to docs from @ python-discord/bot-core@c296ba30d359c7cd92fd5b4a40d7ef898d603bff 🚀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v10.5.1/output/pydis_core.async_stats.html | 14 +++---- v10.5.1/output/pydis_core.exts.html | 8 ++-- v10.5.1/output/pydis_core.html | 46 +++++++++++----------- v10.5.1/output/pydis_core.site_api.html | 34 ++++++++-------- v10.5.1/output/pydis_core.utils.caching.html | 16 ++++---- v10.5.1/output/pydis_core.utils.channel.html | 12 +++--- v10.5.1/output/pydis_core.utils.commands.html | 10 ++--- v10.5.1/output/pydis_core.utils.cooldown.html | 20 +++++----- .../output/pydis_core.utils.error_handling.html | 10 ++--- v10.5.1/output/pydis_core.utils.function.html | 14 +++---- v10.5.1/output/pydis_core.utils.html | 14 +++---- v10.5.1/output/pydis_core.utils.interactions.html | 24 +++++------ v10.5.1/output/pydis_core.utils.logging.html | 16 ++++---- v10.5.1/output/pydis_core.utils.members.html | 12 +++--- v10.5.1/output/pydis_core.utils.paste_service.html | 34 ++++++++-------- v10.5.1/output/pydis_core.utils.regex.html | 14 +++---- v10.5.1/output/pydis_core.utils.scheduling.html | 26 ++++++------ 17 files changed, 162 insertions(+), 162 deletions(-) (limited to 'v10.5.1/output') diff --git a/v10.5.1/output/pydis_core.async_stats.html b/v10.5.1/output/pydis_core.async_stats.html index 6878bb29..116c4f59 100644 --- a/v10.5.1/output/pydis_core.async_stats.html +++ b/v10.5.1/output/pydis_core.async_stats.html @@ -5,14 +5,14 @@ - + async_stats - Pydis Core v10.5.1 - + @@ -379,16 +379,16 @@
-

async_stats#

+

async_stats¶

An async transport method for statsd communication.

-class AsyncStatsClient(loop, host='localhost', port=8125, prefix=None)[source]#
+class AsyncStatsClient(loop, host='localhost', port=8125, prefix=None)[source]¶

Bases: StatsClientBase

An async implementation of statsd.client.base.StatsClientBase that supports async stat communication.

-__init__(loop, host='localhost', port=8125, prefix=None)[source]#
+__init__(loop, host='localhost', port=8125, prefix=None)[source]¶

Create a new AsyncStatsClient.

Parameters:
@@ -405,7 +405,7 @@
-async create_socket()[source]#
+async create_socket()[source]¶

Use asyncio.loop.create_datagram_endpoint from the loop given on init to create a socket.

Return type:
@@ -491,7 +491,7 @@ - + diff --git a/v10.5.1/output/pydis_core.exts.html b/v10.5.1/output/pydis_core.exts.html index 069999f4..74539bcc 100644 --- a/v10.5.1/output/pydis_core.exts.html +++ b/v10.5.1/output/pydis_core.exts.html @@ -5,14 +5,14 @@ - + Exts - Pydis Core v10.5.1 - + @@ -379,7 +379,7 @@
-

Exts#

+

Exts¶

Reusable Discord cogs.

@@ -433,7 +433,7 @@ - + diff --git a/v10.5.1/output/pydis_core.html b/v10.5.1/output/pydis_core.html index 23a472f3..850ecca0 100644 --- a/v10.5.1/output/pydis_core.html +++ b/v10.5.1/output/pydis_core.html @@ -5,14 +5,14 @@ - + Pydis Core - Pydis Core v10.5.1 - + @@ -379,16 +379,16 @@
-

Pydis Core#

+

Pydis Core¶

Useful utilities and tools for Discord bot development.

-class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]#
+class BotBase(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶

Bases: Bot

A sub-class that implements many common features that Python Discord bots use.

-__init__(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]#
+__init__(*args, guild_id, allowed_roles, http_session, redis_session=None, api_client=None, statsd_url=None, **kwargs)[source]¶

Initialise the base bot instance.

Parameters:
@@ -407,7 +407,7 @@ a dummy statsd client will be created.

-async add_cog(cog)[source]#
+async add_cog(cog)[source]¶

Add the given cog to the bot and log the operation.

Return type:
@@ -418,7 +418,7 @@ a dummy statsd client will be created.

-add_command(command)[source]#
+add_command(command)[source]¶

Add command as normal and then add its root aliases to the bot.

Return type:
@@ -429,7 +429,7 @@ a dummy statsd client will be created.

-clear()[source]#
+clear()[source]¶

Not implemented! Re-instantiate the bot instead of attempting to re-use a closed one.

Return type:
@@ -440,7 +440,7 @@ a dummy statsd client will be created.

-async close()[source]#
+async close()[source]¶

Close the Discord connection, and the aiohttp session, connector, statsd client, and resolver.

Return type:
@@ -451,7 +451,7 @@ a dummy statsd client will be created.

-async load_extensions(module, sync_app_commands=True)[source]#
+async load_extensions(module, sync_app_commands=True)[source]¶

Load all the extensions within the given module and save them to self.all_extensions.

Parameters:
@@ -465,7 +465,7 @@ a dummy statsd client will be created.

-async log_to_dev_log(message)[source]#
+async log_to_dev_log(message)[source]¶

Log the given message to #dev-log.

Return type:
@@ -476,7 +476,7 @@ a dummy statsd client will be created.

-async on_guild_available(guild)[source]#
+async on_guild_available(guild)[source]¶

Set the internal guild available event when self.guild_id becomes available.

If the cache appears to still be empty (no members, no channels, or no roles), the event will not be set and guild_available_but_cache_empty event will be emitted.

@@ -489,7 +489,7 @@ will not be set and guild_available_but_cache_empty event will be e
-async on_guild_unavailable(guild)[source]#
+async on_guild_unavailable(guild)[source]¶

Clear the internal guild available event when self.guild_id becomes unavailable.

Return type:
@@ -500,7 +500,7 @@ will not be set and guild_available_but_cache_empty event will be e
-async ping_services()[source]#
+async ping_services()[source]¶

Ping all required services on setup to ensure they are up before starting.

Return type:
@@ -511,7 +511,7 @@ will not be set and guild_available_but_cache_empty event will be e
-async process_commands(message)[source]#
+async process_commands(message)[source]¶

Overwrite default Discord.py behaviour to process commands only after ensuring extensions are loaded.

This extension check is only relevant for clients that make use of pydis_core.BotBase.load_extensions.

@@ -523,7 +523,7 @@ will not be set and guild_available_but_cache_empty event will be e
-remove_command(name)[source]#
+remove_command(name)[source]¶

Remove a command/alias as normal and then remove its root aliases from the bot.

Individual root aliases cannot be removed by this function. To remove them, either remove the entire command or manually edit bot.all_commands.

@@ -536,7 +536,7 @@ To remove them, either remove the entire command or manually edit bot.all_
-async setup_hook()[source]#
+async setup_hook()[source]¶

An async init to startup generic services.

Connects to statsd, and calls AsyncStatsClient.create_socket @@ -550,7 +550,7 @@ and

-async wait_until_guild_available()[source]#
+async wait_until_guild_available()[source]¶

Wait until the guild that matches the guild_id given at init is available (and the cache is ready).

The on_ready event is inadequate because it only waits 2 seconds for a GUILD_CREATE gateway event before giving up and thus not populating the cache for unavailable guilds.

@@ -565,18 +565,18 @@ gateway event before giving up and thus not populating the cache for unavailable
-exception StartupError(base)[source]#
+exception StartupError(base)[source]¶

Bases: Exception

Exception class for startup errors.

-__init__(base)[source]#
+__init__(base)[source]¶
-

Subpackages#

+

Subpackages¶

  • Exts
  • @@ -659,7 +659,7 @@ gateway event before giving up and thus not populating the cache for unavailable
-

Submodules#

+

Submodules¶

  • async_stats
      @@ -786,7 +786,7 @@ gateway event before giving up and thus not populating the cache for unavailable
- + diff --git a/v10.5.1/output/pydis_core.site_api.html b/v10.5.1/output/pydis_core.site_api.html index 07d6eb9a..711bd3a8 100644 --- a/v10.5.1/output/pydis_core.site_api.html +++ b/v10.5.1/output/pydis_core.site_api.html @@ -5,14 +5,14 @@ - + site_api - Pydis Core v10.5.1 - + @@ -379,16 +379,16 @@
-

site_api#

+

site_api¶

An API wrapper around the Site API.

-class APIClient(site_api_url, site_api_token, **session_kwargs)[source]#
+class APIClient(site_api_url, site_api_token, **session_kwargs)[source]¶

Bases: object

A wrapper for the Django Site API.

-__init__(site_api_url, site_api_token, **session_kwargs)[source]#
+__init__(site_api_url, site_api_token, **session_kwargs)[source]¶

Initialize a new APIClient instance.

Parameters:
@@ -403,7 +403,7 @@
-async close()[source]#
+async close()[source]¶

Close the aiohttp session.

Return type:
@@ -414,7 +414,7 @@
-async delete(endpoint, *, raise_for_status=True, **kwargs)[source]#
+async delete(endpoint, *, raise_for_status=True, **kwargs)[source]¶

Equivalent to APIClient.request() with DELETE passed as the method.

Return type:
@@ -425,7 +425,7 @@
-async get(endpoint, *, raise_for_status=True, **kwargs)[source]#
+async get(endpoint, *, raise_for_status=True, **kwargs)[source]¶

Equivalent to APIClient.request() with GET passed as the method.

Return type:
@@ -436,7 +436,7 @@
-async static maybe_raise_for_status(response, should_raise)[source]#
+async static maybe_raise_for_status(response, should_raise)[source]¶

Raise ResponseCodeError for non-OK response if an exception should be raised.

Parameters:
@@ -456,7 +456,7 @@
-async patch(endpoint, *, raise_for_status=True, **kwargs)[source]#
+async patch(endpoint, *, raise_for_status=True, **kwargs)[source]¶

Equivalent to APIClient.request() with PATCH passed as the method.

Return type:
@@ -467,7 +467,7 @@
-async post(endpoint, *, raise_for_status=True, **kwargs)[source]#
+async post(endpoint, *, raise_for_status=True, **kwargs)[source]¶

Equivalent to APIClient.request() with POST passed as the method.

Return type:
@@ -478,7 +478,7 @@
-async put(endpoint, *, raise_for_status=True, **kwargs)[source]#
+async put(endpoint, *, raise_for_status=True, **kwargs)[source]¶

Equivalent to APIClient.request() with PUT passed as the method.

Return type:
@@ -489,7 +489,7 @@
-async request(method, endpoint, *, raise_for_status=True, **kwargs)[source]#
+async request(method, endpoint, *, raise_for_status=True, **kwargs)[source]¶

Send an HTTP request to the site API and return the JSON response.

Parameters:
@@ -516,12 +516,12 @@
-exception ResponseCodeError(response, response_json=None, response_text=None)[source]#
+exception ResponseCodeError(response, response_json=None, response_text=None)[source]¶

Bases: ValueError

Raised in APIClient.request() when a non-OK HTTP response is received.

-__init__(response, response_json=None, response_text=None)[source]#
+__init__(response, response_json=None, response_text=None)[source]¶

Initialize a new ResponseCodeError instance.

Parameters:
@@ -536,7 +536,7 @@
-__str__()[source]#
+__str__()[source]¶

Return a string representation of the error.

@@ -629,7 +629,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.caching.html b/v10.5.1/output/pydis_core.utils.caching.html index c8e4a6f9..f5f809e5 100644 --- a/v10.5.1/output/pydis_core.utils.caching.html +++ b/v10.5.1/output/pydis_core.utils.caching.html @@ -5,14 +5,14 @@ - + caching - Pydis Core v10.5.1 - + @@ -379,18 +379,18 @@
-

caching#

+

caching¶

Utilities related to custom caches.

-class AsyncCache(max_size=128)[source]#
+class AsyncCache(max_size=128)[source]¶

Bases: object

LRU cache implementation for coroutines.

Once the cache exceeds the maximum size, keys are deleted in FIFO order.

An offset may be optionally provided to be applied to the coroutine’s arguments when creating the cache key.

-__call__(arg_offset=0)[source]#
+__call__(arg_offset=0)[source]¶

Decorator for async cache.

Parameters:
@@ -407,7 +407,7 @@
-__init__(max_size=128)[source]#
+__init__(max_size=128)[source]¶

Initialise a new AsyncCache instance.

Parameters:
@@ -418,7 +418,7 @@
-clear()[source]#
+clear()[source]¶

Clear cache instance.

Return type:
@@ -505,7 +505,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.channel.html b/v10.5.1/output/pydis_core.utils.channel.html index 9008dcab..e5d10ca2 100644 --- a/v10.5.1/output/pydis_core.utils.channel.html +++ b/v10.5.1/output/pydis_core.utils.channel.html @@ -5,14 +5,14 @@ - + channel - Pydis Core v10.5.1 - + @@ -379,11 +379,11 @@
-

channel#

+

channel¶

Useful helper functions for interacting with various discord channel objects.

-async get_or_fetch_channel(bot, channel_id)[source]#
+async get_or_fetch_channel(bot, channel_id)[source]¶

Attempt to get or fetch the given channel_id from the bots cache, and return it.

Parameters:
@@ -411,7 +411,7 @@
-is_in_category(channel, category_id)[source]#
+is_in_category(channel, category_id)[source]¶

Return whether the given channel in the the category with the id category_id.

Parameters:
@@ -501,7 +501,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.commands.html b/v10.5.1/output/pydis_core.utils.commands.html index a8df8db8..cfece3c3 100644 --- a/v10.5.1/output/pydis_core.utils.commands.html +++ b/v10.5.1/output/pydis_core.utils.commands.html @@ -5,14 +5,14 @@ - + commands - Pydis Core v10.5.1 - + @@ -379,10 +379,10 @@
-

commands#

+

commands¶

-async clean_text_or_reply(ctx, text=None)[source]#
+async clean_text_or_reply(ctx, text=None)[source]¶

Cleans a text argument or replied message’s content.

Parameters:
@@ -474,7 +474,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.cooldown.html b/v10.5.1/output/pydis_core.utils.cooldown.html index 8550f9b0..89700f64 100644 --- a/v10.5.1/output/pydis_core.utils.cooldown.html +++ b/v10.5.1/output/pydis_core.utils.cooldown.html @@ -5,14 +5,14 @@ - + cooldown - Pydis Core v10.5.1 - + @@ -379,21 +379,21 @@
-

cooldown#

+

cooldown¶

Helpers for setting a cooldown on commands.

-exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]#
+exception CommandOnCooldown(message, function, /, *args, **kwargs)[source]¶

Bases: CommandError, Generic[P, R]

Raised when a command is invoked while on cooldown.

-__init__(message, function, /, *args, **kwargs)[source]#
+__init__(message, function, /, *args, **kwargs)[source]¶
-async call_without_cooldown()[source]#
+async call_without_cooldown()[source]¶

Run the command this cooldown blocked.

Return type:
@@ -409,20 +409,20 @@
-P = ~P[source]#
+P = ~P[source]¶

The command’s signature.

-class R[source]#
+class R[source]¶

The command’s return value.

alias of TypeVar(‘R’)

-block_duplicate_invocations(*, cooldown_duration=5, send_notice=False, args_preprocessor=None)[source]#
+block_duplicate_invocations(*, cooldown_duration=5, send_notice=False, args_preprocessor=None)[source]¶

Prevent duplicate invocations of a command with the same arguments in a channel for cooldown_duration seconds.

Parameters:
@@ -524,7 +524,7 @@ its return value is then used to check for the cooldown instead of the raw argum - + 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 71782cd5..0d9d786c 100644 --- a/v10.5.1/output/pydis_core.utils.error_handling.html +++ b/v10.5.1/output/pydis_core.utils.error_handling.html @@ -5,14 +5,14 @@ - + error_handling - Pydis Core v10.5.1 - + @@ -379,10 +379,10 @@
-

error_handling#

+

error_handling¶

-async handle_forbidden_from_block(error, message=None)[source]#
+async handle_forbidden_from_block(error, message=None)[source]¶

Handles discord.Forbidden 90001 errors, or re-raises if error isn’t a 90001 error.

Parameters:
@@ -468,7 +468,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.function.html b/v10.5.1/output/pydis_core.utils.function.html index 7cf4755a..946565f5 100644 --- a/v10.5.1/output/pydis_core.utils.function.html +++ b/v10.5.1/output/pydis_core.utils.function.html @@ -5,14 +5,14 @@ - + function - Pydis Core v10.5.1 - + @@ -379,18 +379,18 @@
-

function#

+

function¶

Utils for manipulating functions.

-exception GlobalNameConflictError[source]#
+exception GlobalNameConflictError[source]¶

Bases: Exception

Raised on a conflict between the globals used to resolve annotations of a wrapped function and its wrapper.

-command_wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',), *, ignored_conflict_names=frozenset({}))[source]#
+command_wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',), *, ignored_conflict_names=frozenset({}))[source]¶

Update the decorated function to look like wrapped, and update globals for discord.py forwardref evaluation.

See update_wrapper_globals() for more details on how the globals are updated.

@@ -414,7 +414,7 @@ with the wrapper replaced with the function
-update_wrapper_globals(wrapper, wrapped, *, ignored_conflict_names=frozenset({}))[source]#
+update_wrapper_globals(wrapper, wrapped, *, ignored_conflict_names=frozenset({}))[source]¶

Create a copy of wrapper, the copy’s globals are updated with wrapped's globals.

For forwardrefs in command annotations, discord.py uses the __global__ attribute of the function to resolve their values. This breaks for decorators that replace the function because they have @@ -515,7 +515,7 @@ changes won’t be reflected in the new function’s globals.

- + diff --git a/v10.5.1/output/pydis_core.utils.html b/v10.5.1/output/pydis_core.utils.html index e9fa7e0a..0c93cb51 100644 --- a/v10.5.1/output/pydis_core.utils.html +++ b/v10.5.1/output/pydis_core.utils.html @@ -5,14 +5,14 @@ - + Utils - Pydis Core v10.5.1 - + @@ -379,11 +379,11 @@
-

Utils#

+

Utils¶

Useful utilities and tools for Discord bot development.

-apply_monkey_patches()[source]#
+apply_monkey_patches()[source]¶

Applies all common monkey patches for our bots.

Return type:
@@ -402,7 +402,7 @@ that will act as top-level groups rather than being aliases of the command’s g
-unqualify(name)[source]#
+unqualify(name)[source]¶

Return an unqualified name given a qualified module/package name.

Parameters:
@@ -418,7 +418,7 @@ that will act as top-level groups rather than being aliases of the command’s g
-

Submodules#

+

Submodules¶

  • caching
      @@ -605,7 +605,7 @@ that will act as top-level groups rather than being aliases of the command’s g
- + diff --git a/v10.5.1/output/pydis_core.utils.interactions.html b/v10.5.1/output/pydis_core.utils.interactions.html index 4b415a7c..a9ffbaaf 100644 --- a/v10.5.1/output/pydis_core.utils.interactions.html +++ b/v10.5.1/output/pydis_core.utils.interactions.html @@ -5,14 +5,14 @@ - + interactions - Pydis Core v10.5.1 - + @@ -379,10 +379,10 @@
-

interactions#

+

interactions¶

-class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]#
+class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶

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.

@@ -397,12 +397,12 @@
-__init__(*, style=('secondary', 2), label='Delete', **kwargs)[source]#
+__init__(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶
-async callback(interaction)[source]#
+async callback(interaction)[source]¶

Delete the original message on button click.

Return type:
@@ -415,7 +415,7 @@
-class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]#
+class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶

Bases: View

A view that allows the original invoker and moderators to interact with it.

@@ -432,12 +432,12 @@ If None
-__init__(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]#
+__init__(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶
-async interaction_check(interaction)[source]#
+async interaction_check(interaction)[source]¶

Ensure the user clicking the button is the view invoker, or a moderator.

Parameters:
@@ -451,7 +451,7 @@ If None
-async on_timeout()[source]#
+async on_timeout()[source]¶

Remove the view from self.message if set.

Return type:
@@ -462,7 +462,7 @@ If None
-stop()[source]#
+stop()[source]¶

Stop listening for interactions, and remove the view from self.message if set.

Return type:
@@ -555,7 +555,7 @@ If None - + diff --git a/v10.5.1/output/pydis_core.utils.logging.html b/v10.5.1/output/pydis_core.utils.logging.html index adfc91ea..2e90d098 100644 --- a/v10.5.1/output/pydis_core.utils.logging.html +++ b/v10.5.1/output/pydis_core.utils.logging.html @@ -5,14 +5,14 @@ - + logging - Pydis Core v10.5.1 - + @@ -379,16 +379,16 @@
-

logging#

+

logging¶

Common logging related functions.

-class CustomLogger(name, level=0)[source]#
+class CustomLogger(name, level=0)[source]¶

Bases: Logger

Custom implementation of the logging.Logger class with an added trace method.

-trace(msg, *args, **kwargs)[source]#
+trace(msg, *args, **kwargs)[source]¶

Log the given message with the severity "TRACE".

To pass exception information, use the keyword argument exc_info with a true value:

logger.trace("Houston, we have an %s", "interesting problem", exc_info=1)
@@ -412,7 +412,7 @@
 
 
-get_logger(name=None)[source]#
+get_logger(name=None)[source]¶

Utility to make mypy recognise that logger is of type CustomLogger.

Parameters:
@@ -429,7 +429,7 @@
-log_format[source]#
+log_format[source]¶

A logging.Formatter that can be used to standardise logging across all projects using pydis_core.

@@ -511,7 +511,7 @@
- + diff --git a/v10.5.1/output/pydis_core.utils.members.html b/v10.5.1/output/pydis_core.utils.members.html index 84b99c1d..58cf2795 100644 --- a/v10.5.1/output/pydis_core.utils.members.html +++ b/v10.5.1/output/pydis_core.utils.members.html @@ -5,14 +5,14 @@ - + members - Pydis Core v10.5.1 - + @@ -379,11 +379,11 @@
-

members#

+

members¶

Useful helper functions for interactin with discord.Member objects.

-async get_or_fetch_member(guild, member_id)[source]#
+async get_or_fetch_member(guild, member_id)[source]¶

Attempt to get a member from cache; on failure fetch from the API.

Return type:
@@ -397,7 +397,7 @@
-async handle_role_change(member, coro, role)[source]#
+async handle_role_change(member, coro, role)[source]¶

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.

@@ -487,7 +487,7 @@ - + diff --git a/v10.5.1/output/pydis_core.utils.paste_service.html b/v10.5.1/output/pydis_core.utils.paste_service.html index 9b6295ea..d305abe4 100644 --- a/v10.5.1/output/pydis_core.utils.paste_service.html +++ b/v10.5.1/output/pydis_core.utils.paste_service.html @@ -5,14 +5,14 @@ - + paste_service - Pydis Core v10.5.1 - + @@ -379,16 +379,16 @@
-

paste_service#

+

paste_service¶

-MAX_PASTE_SIZE = 524288[source]#
+MAX_PASTE_SIZE = 524288[source]¶

The maximum allows size of a paste, in bytes.

-class PasteFile(**data)[source]#
+class PasteFile(**data)[source]¶

Bases: BaseModel

A file to be pasted to the paste service.

@@ -402,19 +402,19 @@
-model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
+model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

-model_config: ClassVar[ConfigDict] = {}#
+model_config: ClassVar[ConfigDict] = {}¶

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

-model_fields: ClassVar[dict[str, FieldInfo]] = {'content': FieldInfo(annotation=str, required=True), 'lexer': FieldInfo(annotation=str, required=False, default='python'), 'name': FieldInfo(annotation=str, required=False, default='')}#
+model_fields: ClassVar[dict[str, FieldInfo]] = {'content': FieldInfo(annotation=str, required=True), 'lexer': FieldInfo(annotation=str, required=False, default='python'), 'name': FieldInfo(annotation=str, required=False, default='')}¶

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

@@ -424,7 +424,7 @@ mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
-class PasteResponse(**data)[source]#
+class PasteResponse(**data)[source]¶

Bases: BaseModel

A successful response from the paste service.

@@ -437,19 +437,19 @@ mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
-model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
+model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

-model_config: ClassVar[ConfigDict] = {}#
+model_config: ClassVar[ConfigDict] = {}¶

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

-model_fields: ClassVar[dict[str, FieldInfo]] = {'link': FieldInfo(annotation=str, required=True), 'removal': FieldInfo(annotation=str, required=True)}#
+model_fields: ClassVar[dict[str, FieldInfo]] = {'link': FieldInfo(annotation=str, required=True), 'removal': FieldInfo(annotation=str, required=True)}¶

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

@@ -459,28 +459,28 @@ mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
-exception PasteTooLongError[source]#
+exception PasteTooLongError[source]¶

Bases: Exception

Raised when content is too large to upload to the paste service.

-exception PasteUnsupportedLexerError[source]#
+exception PasteUnsupportedLexerError[source]¶

Bases: Exception

Raised when an unsupported lexer is used.

-exception PasteUploadError[source]#
+exception PasteUploadError[source]¶

Bases: Exception

Raised when an error is encountered uploading to the paste service.

-async send_to_paste_service(*, files, http_session, paste_url='https://paste.pythondiscord.com', max_size=524288)[source]#
+async send_to_paste_service(*, files, http_session, paste_url='https://paste.pythondiscord.com', max_size=524288)[source]¶

Upload some contents to the paste service.

Parameters:
@@ -594,7 +594,7 @@ mapping of field names to [FieldInfo][pydantic.fields.FieldInfo]. - + diff --git a/v10.5.1/output/pydis_core.utils.regex.html b/v10.5.1/output/pydis_core.utils.regex.html index 5bb81526..1354675e 100644 --- a/v10.5.1/output/pydis_core.utils.regex.html +++ b/v10.5.1/output/pydis_core.utils.regex.html @@ -5,14 +5,14 @@ - + regex - Pydis Core v10.5.1 - + @@ -379,11 +379,11 @@
-

regex#

+

regex¶

Common regular expressions.

-DISCORD_INVITE[source]#
+DISCORD_INVITE[source]¶

Regex for Discord server invites.

Warning

@@ -397,7 +397,7 @@ such as
-FORMATTED_CODE_REGEX[source]#
+FORMATTED_CODE_REGEX[source]¶

Regex for formatted code, using Discord’s code blocks.

@@ -405,7 +405,7 @@ such as
-RAW_CODE_REGEX[source]#
+RAW_CODE_REGEX[source]¶

Regex for raw code, not using Discord’s code blocks.

@@ -484,7 +484,7 @@ such as - + diff --git a/v10.5.1/output/pydis_core.utils.scheduling.html b/v10.5.1/output/pydis_core.utils.scheduling.html index 6e13af75..56ba1602 100644 --- a/v10.5.1/output/pydis_core.utils.scheduling.html +++ b/v10.5.1/output/pydis_core.utils.scheduling.html @@ -5,14 +5,14 @@ - + scheduling - Pydis Core v10.5.1 - + @@ -379,11 +379,11 @@
-

scheduling#

+

scheduling¶

Generic python scheduler.

-class Scheduler(name)[source]#
+class Scheduler(name)[source]¶

Bases: object

Schedule the execution of coroutines and keep track of them.

When instantiating a Scheduler, a name must be provided. This name is used to distinguish the @@ -397,7 +397,7 @@ the same ID used to schedule it.

Any exception raised in a scheduled task is logged when the task is done.

-__contains__(task_id)[source]#
+__contains__(task_id)[source]¶

Return True if a task with the given task_id is currently scheduled.

Parameters:
@@ -414,7 +414,7 @@ the same ID used to schedule it.

-__init__(name)[source]#
+__init__(name)[source]¶

Initialize a new Scheduler instance.

Parameters:
@@ -425,7 +425,7 @@ the same ID used to schedule it.

-cancel(task_id)[source]#
+cancel(task_id)[source]¶

Unschedule the task identified by task_id. Log a warning if the task doesn’t exist.

Parameters:
@@ -439,7 +439,7 @@ the same ID used to schedule it.

-cancel_all()[source]#
+cancel_all()[source]¶

Unschedule all known tasks.

Return type:
@@ -450,7 +450,7 @@ the same ID used to schedule it.

-schedule(task_id, coroutine)[source]#
+schedule(task_id, coroutine)[source]¶

Schedule the execution of a coroutine.

If a task with task_id already exists, close coroutine instead of scheduling it. This prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.

@@ -469,7 +469,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-
-schedule_at(time, task_id, coroutine)[source]#
+schedule_at(time, task_id, coroutine)[source]¶

Schedule coroutine to be executed at the given time.

If time is timezone aware, then use that timezone to calculate now() when subtracting. If time is naïve, then use UTC.

@@ -492,7 +492,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-
-schedule_later(delay, task_id, coroutine)[source]#
+schedule_later(delay, task_id, coroutine)[source]¶

Schedule coroutine to be executed after delay seconds.

If a task with task_id already exists, close coroutine instead of scheduling it. This prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.

@@ -514,7 +514,7 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-
-create_task(coro, *, suppressed_exceptions=(), event_loop=None, **kwargs)[source]#
+create_task(coro, *, suppressed_exceptions=(), event_loop=None, **kwargs)[source]¶

Wrapper for creating an asyncio.Task which logs exceptions raised in the task.

If the event_loop kwarg is provided, the task is created from that event loop, otherwise the running loop is used.

@@ -617,7 +617,7 @@ otherwise the running loop is used.

- + -- cgit v1.2.3