From a04595198ded086fa2f39201ca5f9afa2f696d4a Mon Sep 17 00:00:00 2001
From: ChrisLovering Create a new loop (asyncio.AbstractEventLoop) β The event loop to use when creating the
- host ( port ( loop (asyncio.AbstractEventLoop) β The event loop to use when creating the
+ host ( port ( Use Use Initialise the base bot instance. guild_id ( allowed_roles ( guild_id ( allowed_roles ( http_session (aiohttp.ClientSession) β The session to use for the bot. redis_session ( api_client ( statsd_url ( redis_session ( api_client ( statsd_url (
AsyncStatsClient.
-
@@ -369,10 +369,10 @@
-
asyncio.loop.create_datagram_endpoint.str) β The host to connect to.int) β The port to connect to.asyncio.loop.create_datagram_endpoint.str) β The host to connect to.int) β The port to connect to.
diff --git a/v8.0.0/output/botcore.exts.html b/v8.0.0/output/botcore.exts.html
index 4156cf66..f39da69f 100644
--- a/v8.0.0/output/botcore.exts.html
+++ b/v8.0.0/output/botcore.exts.html
@@ -2,7 +2,7 @@
-
+
@@ -204,7 +204,7 @@
asyncio.loop.create_datagram_endpoint from the loop given on init to create a socket.asyncio.loop.create_datagram_endpoint from the loop given on init to create a socket.
-
-
int) β The ID of the guild used for wait_until_guild_available().list) β A list of role IDs that the bot is allowed to mention.int) β The ID of the guild used for wait_until_guild_available().list) β A list of role IDs that the bot is allowed to mention.Optional[RedisSession]) β The async_rediscache.RedisSession to use for the bot.Optional[APIClient]) β The botcore.site_api.APIClient instance to use for the bot.Optional[str]) β The URL of the statsd server to use for the bot. If not given,
+Optional[RedisSession]) β The async_rediscache.RedisSession to use for the bot.Optional[APIClient]) β The botcore.site_api.APIClient instance to use for the bot.Optional[str]) β The URL of the statsd server to use for the bot. If not given,
a dummy statsd client will be created.
Add the given cog to the bot and log the operation.
Add command as normal and then add its root aliases to the bot.
Not implemented! Re-instantiate the bot instead of attempting to re-use a closed one.
Close the Discord connection, and the aiohttp session, connector, statsd client, and resolver.
Load all the extensions within the given module and save them to self.all_extensions.
This should be ran in a task on the event loop to avoid deadlocks caused by wait_for calls.
Log the given message to #dev-log.
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.
@@ -453,8 +453,8 @@ will not be set and guild_available_but_cache_empty event will be e async on_guild_unavailable(guild)[source]#Clear the internal guild available event when self.guild_id becomes unavailable.
Ping all required services on setup to ensure they are up before starting.
Individual root aliases cannot be removed by this function. To remove them, either remove the entire command or manually edit bot.all_commands.
@@ -491,8 +491,8 @@ To remove them, either remove the entire command or manually edit bot.all_AsyncStatsClient.create_socket
and ping_services().
@@ -504,8 +504,8 @@ and
-Bases: Exception
Bases: Exception
Exception class for startup errors.
Bases: object
Bases: object
A wrapper for the Django Site API.
Initialize a new APIClient instance.
site_api_url (str) β The URL of the site API.
site_api_token (str) β The token to use for authentication.
site_api_url (str) β The URL of the site API.
site_api_token (str) β The token to use for authentication.
session_kwargs β Keyword arguments to pass to the aiohttp.ClientSession constructor.
Close the aiohttp session.
Send a DELETE request to the site API and return the JSON response.
endpoint (str) β The endpoint to send the request to.
raise_for_status (bool) β Whether or not to raise an exception if the response is not OK.
endpoint (str) β The endpoint to send the request to.
raise_for_status (bool) β Whether or not to raise an exception if the response is not OK.
**kwargs β Any extra keyword arguments to pass to aiohttp.request().
The JSON response the API returns, or None if the response is 204 No Content.
Equivalent to APIClient.request() with GET passed as the method.
Raise ResponseCodeError for non-OK response if an exception should be raised.
response (aiohttp.ClientResponse) β The response to check.
should_raise (bool) β Whether or not to raise an exception.
should_raise (bool) β Whether or not to raise an exception.
ResponseCodeError β If the response is not OK and should_raise is True.
Equivalent to APIClient.request() with PATCH passed as the method.
Equivalent to APIClient.request() with POST passed as the method.
Equivalent to APIClient.request() with PUT passed as the method.
Send an HTTP request to the site API and return the JSON response.
method (str) β The HTTP method to use.
endpoint (str) β The endpoint to send the request to.
raise_for_status (bool) β Whether or not to raise an exception if the response is not OK.
method (str) β The HTTP method to use.
endpoint (str) β The endpoint to send the request to.
raise_for_status (bool) β Whether or not to raise an exception if the response is not OK.
**kwargs β Any extra keyword arguments to pass to aiohttp.request().
The JSON response the API returns.
ResponseCodeError β If the response is not OK and raise_for_status is True.
Bases: ValueError
Bases: ValueError
Raised in APIClient.request() when a non-OK HTTP response is received.
Initialize a new ResponseCodeError instance.
response (aiohttp.ClientResponse) β The response object from the request.
response_json (Optional[dict]) β The JSON response returned from the request, if any.
response_text (Optional[str]) β The text of the request, if any.
response_json (Optional[dict]) β The JSON response returned from the request, if any.
response_text (Optional[str]) β The text of the request, if any.
Bases: object
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.
@@ -356,13 +356,13 @@ __call__(arg_offset=0)[source]#Decorator for async cache.
arg_offset (int) β The offset for the position of the key argument.
arg_offset (int) β The offset for the position of the key argument.
A decorator to wrap the target function.
Initialise a new AsyncCache instance.
Clear cache instance.
Attempt to get or fetch the given channel_id from the bots cache, and return it.
bot (Bot) β The discord.ext.commands.Bot instance to use for getting/fetching.
channel_id (int) β The channel to get/fetch.
channel_id (int) β The channel to get/fetch.
discord.InvalidData β An unknown channel type was received from Discord.
discord.HTTPException β Retrieving the channel failed.
discord.Forbidden β You do not have permission to fetch this channel.
The channel from the ID.
Return whether the given channel in the the category with the id category_id.
channel (TextChannel) β The channel to check.
category_id (int) β The category to check for.
category_id (int) β The category to check for.
A bool depending on whether the channel is in the category.
Cleans a text argument or replied messageβs content.
discord.ext.commands.BadArgument β text wasnβt provided and thereβs no reply message / reply message content.
The cleaned version of text, if given, else replied message.
Return an unqualified name given a qualified module/package name.
name (str) β The module name to unqualify.
name (str) β The module name to unqualify.
The unqualified module name.
This button itself carries out no interaction checks, these should be done by the parent view.
See botcore.utils.interactions.ViewWithUserAndRoleCheck for a view that implements basic checks.
style (ButtonStyle) β The style of the button, set to ButtonStyle.secondary if not specified.
label (str) β The label of the button, set to βDeleteβ if not specified.
label (str) β The label of the button, set to βDeleteβ if not specified.
Delete the original message on button click.
Bases: View
A view that allows the original invoker and moderators to interact with it.
allowed_users (Sequence[int]) β A sequence of userβs ids who are allowed to interact with the view.
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.
+
allowed_users (Sequence[int]) β A sequence of userβs ids who are allowed to interact with the view.
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.
If None 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 with
view.message = await ctx.send( ... )` , or similar, after the view is instantiated.
Noneasync interaction_check(interaction)[source]#
Ensure the user clicking the button is the view invoker, or a moderator.
-- Parameters
+- Parameters:
interaction (Interaction) β The interaction that occurred.
-- Return type
--
+
- Return type:
+-
Noneasync on_timeout()[source]#
Remove the view from self.message if set.
diff --git a/v8.0.0/output/botcore.utils.logging.html b/v8.0.0/output/botcore.utils.logging.html
index 5bf302de..3c13a97a 100644
--- a/v8.0.0/output/botcore.utils.logging.html
+++ b/v8.0.0/output/botcore.utils.logging.html
@@ -2,7 +2,7 @@
-
+
@@ -204,7 +204,7 @@
-
- main
+ main
-
@@ -347,8 +347,8 @@
-
class CustomLogger(name, level=0)[source]#
-Bases: Logger
-Custom implementation of the logging.Logger class with an added trace method.
+Bases: Logger
+Custom implementation of the logging.Logger class with an added trace method.
@@ -378,13 +378,13 @@
get_logger(name=None)[source]#
Utility to make mypy recognise that logger is of type CustomLogger.
-- Parameters
--
+
- Parameters:
+-
-- Return type
+- Return type:
-
-- Returns
+- Returns:
An instance of the CustomLogger class.
diff --git a/v8.0.0/output/botcore.utils.members.html b/v8.0.0/output/botcore.utils.members.html
index c8c95ca3..74b05b45 100644
--- a/v8.0.0/output/botcore.utils.members.html
+++ b/v8.0.0/output/botcore.utils.members.html
@@ -2,7 +2,7 @@
-
+
@@ -204,7 +204,7 @@
-
- main
+ main
-
@@ -349,11 +349,11 @@
async get_or_fetch_member(guild, member_id)[source]#
Attempt to get a member from cache; on failure fetch from the API.
-- Return type
--
+
- Return type:
+-
-- Returns
-The discord.Member or None to indicate the member could not be found.
+- Returns:
+The discord.Member or None to indicate the member could not be found.
@@ -365,15 +365,15 @@
Handle errors that we expect to be raised from
discord.Member.add_roles and discord.Member.remove_roles.
-- Parameters
+- Parameters:
member (Member) β The member that is being modified for logging purposes.
-coro (Callable[[Role], Coroutine]) β This is intended to be discord.Member.add_roles or discord.Member.remove_roles.
+coro (Callable[[Role], Coroutine]) β This is intended to be discord.Member.add_roles or discord.Member.remove_roles.
role (Role) β The role to be passed to coro.
-- Return type
--
+
- Return type:
+-
diff --git a/v8.0.0/output/botcore.utils.regex.html b/v8.0.0/output/botcore.utils.regex.html
index 4c555070..34d1d3d8 100644
--- a/v8.0.0/output/botcore.utils.regex.html
+++ b/v8.0.0/output/botcore.utils.regex.html
@@ -2,7 +2,7 @@
-
+
@@ -204,7 +204,7 @@
-
- main
+ main
-
@@ -352,7 +352,7 @@
Warning
This regex pattern will capture until a whitespace, if you are to use the βinviteβ capture group in
any HTTP requests or similar. Please ensure you sanitise the output using something
-such as urllib.parse.quote().
+such as urllib.parse.quote().
diff --git a/v8.0.0/output/botcore.utils.scheduling.html b/v8.0.0/output/botcore.utils.scheduling.html
index ec566366..7817e4f1 100644
--- a/v8.0.0/output/botcore.utils.scheduling.html
+++ b/v8.0.0/output/botcore.utils.scheduling.html
@@ -2,7 +2,7 @@
-
+
@@ -204,7 +204,7 @@
-
- main
+ main
-
@@ -347,7 +347,7 @@
-
class Scheduler(name)[source]#
-Bases: object
+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
instanceβs log messages from other instances. Using the name of the class or module containing
@@ -361,16 +361,16 @@ the same ID used to schedule it.
-
__contains__(task_id)[source]#
-Return True if a task with the given task_id is currently scheduled.
+Return True if a task with the given task_id is currently scheduled.
@@ -380,8 +380,8 @@ the same ID used to schedule it.
__init__(name)[source]#
Initialize a new Scheduler instance.
@@ -391,11 +391,11 @@ the same ID used to schedule it.
cancel(task_id)[source]#
Unschedule the task identified by task_id. Log a warning if the task doesnβt exist.
@@ -405,8 +405,8 @@ the same ID used to schedule it.
cancel_all()[source]#
Unschedule all known tasks.
@@ -418,14 +418,14 @@ the same ID used to schedule it.
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.
timeIf 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.
-- Parameters
+- Parameters:
-time (datetime) β The time to start the task.
-task_id (Hashable) β A unique ID to create the task with.
-coroutine (Coroutine) β The function to be called.
+time (datetime) β The time to start the task.
+task_id (Hashable) β A unique ID to create the task with.
+coroutine (Coroutine) β The function to be called.
-- Return type
--
+
- Return type:
+-
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.
delay (Union[int, float]) β How long to wait before starting the task.
task_id (Hashable) β A unique ID to create the task with.
coroutine (Coroutine) β The function to be called.
delay (Union[int, float]) β How long to wait before starting the task.
task_id (Hashable) β A unique ID to create the task with.
coroutine (Coroutine) β The function to be called.
Wrapper for creating an asyncio.Task which logs exceptions raised in the task.
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.
coro (Coroutine[Any, Any, TypeVar(TASK_RETURN)]) β The function to call.
suppressed_exceptions (tuple[type[Exception], ...]) β Exceptions to be handled by the task.
event_loop (asyncio.AbstractEventLoop) β The loop to create the task from.
kwargs β Passed to asyncio.create_task().
coro (Coroutine[Any, Any, TypeVar(TASK_RETURN)]) β The function to call.
suppressed_exceptions (tuple[type[Exception], ...]) β Exceptions to be handled by the task.
event_loop (asyncio.AbstractEventLoop) β The loop to create the task from.
kwargs β Passed to asyncio.create_task().
The wrapped task.