Drop superfluous zero in version related changes in the documentation
This commit is contained in:
parent
4de314d2c3
commit
02397306b2
@ -659,7 +659,7 @@ class GuildChannel:
|
||||
Clones this channel. This creates a channel with the same properties
|
||||
as this channel.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Parameters
|
||||
------------
|
||||
|
@ -102,7 +102,7 @@ class BaseActivity:
|
||||
what is currently set. This behaviour may change in the future so there are
|
||||
no guarantees on whether Discord will actually let you set these types.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
__slots__ = ('_created_at',)
|
||||
|
||||
@ -113,7 +113,7 @@ class BaseActivity:
|
||||
def created_at(self):
|
||||
"""Optional[:class:`datetime.datetime`]: When the user started doing this activity in UTC.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
if self._created_at is not None:
|
||||
return datetime.datetime.utcfromtimestamp(self._created_at / 1000)
|
||||
@ -534,7 +534,7 @@ class Spotify:
|
||||
def created_at(self):
|
||||
"""Optional[:class:`datetime.datetime`]: When the user started listening in UTC.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
if self._created_at is not None:
|
||||
return datetime.datetime.utcfromtimestamp(self._created_at / 1000)
|
||||
@ -666,7 +666,7 @@ class CustomActivity(BaseActivity):
|
||||
|
||||
Returns the custom status text.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
|
@ -171,7 +171,7 @@ class Asset:
|
||||
and a URL won't be present if a custom image isn't associated with
|
||||
the asset, e.g. a guild with no custom icon.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Raises
|
||||
------
|
||||
|
@ -219,7 +219,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
A :class:`dict` of target (either a role or a member) to
|
||||
:class:`PermissionOverwrite` to apply to the channel.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Raises
|
||||
------
|
||||
@ -431,7 +431,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
|
||||
Requires :attr:`~.Permissions.manage_webhooks` permissions.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
Added the ``reason`` keyword-only parameter.
|
||||
|
||||
Parameters
|
||||
@ -474,7 +474,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
The webhook returned will not provide a token to do webhook
|
||||
actions, as Discord does not provide it.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -601,7 +601,7 @@ class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
|
||||
def voice_states(self):
|
||||
"""Returns a mapping of member IDs who have voice states in this channel.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
.. note::
|
||||
|
||||
@ -666,7 +666,7 @@ class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
|
||||
A :class:`dict` of target (either a role or a member) to
|
||||
:class:`PermissionOverwrite` to apply to the channel.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Raises
|
||||
------
|
||||
@ -776,7 +776,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
|
||||
A :class:`dict` of target (either a role or a member) to
|
||||
:class:`PermissionOverwrite` to apply to the channel.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Raises
|
||||
------
|
||||
|
@ -283,7 +283,7 @@ class Client:
|
||||
def cached_messages(self):
|
||||
"""Sequence[:class:`.Message`]: Read-only list of messages the connected client has cached.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
"""
|
||||
return utils.SequenceProxy(self._connection._messages or [])
|
||||
|
||||
@ -1283,7 +1283,7 @@ class Client:
|
||||
|
||||
This method is an API call. For general usage, consider :meth:`get_channel` instead.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Raises
|
||||
-------
|
||||
|
@ -428,7 +428,7 @@ class Embed:
|
||||
This function returns the class instance to allow for fluent-style
|
||||
chaining.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
|
@ -182,7 +182,7 @@ class UserConverter(IDConverter):
|
||||
class MessageConverter(Converter):
|
||||
"""Converts to a :class:`discord.Message`.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
The lookup strategy is as follows (in order):
|
||||
|
||||
|
@ -297,7 +297,7 @@ class Command(_BaseCommand):
|
||||
|
||||
This is the non-decorator interface to :func:`.check`.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -313,7 +313,7 @@ class Command(_BaseCommand):
|
||||
This function is idempotent and will not raise an exception
|
||||
if the function is not in the command's checks.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -582,7 +582,7 @@ class Command(_BaseCommand):
|
||||
|
||||
For example in commands ``?a b c test``, the parents are ``[c, b, a]``.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
"""
|
||||
entries = []
|
||||
command = self
|
||||
@ -1306,7 +1306,7 @@ def group(name=None, **attrs):
|
||||
This is similar to the :func:`.command` decorator but the ``cls``
|
||||
parameter is set to :class:`Group` by default.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
The ``cls`` parameter can now be passed.
|
||||
"""
|
||||
|
||||
@ -1346,7 +1346,7 @@ def check(predicate):
|
||||
The function returned by ``predicate`` is **always** a coroutine,
|
||||
even if the original function was not a coroutine.
|
||||
|
||||
.. versionchanged:: 1.3.0
|
||||
.. versionchanged:: 1.3
|
||||
The ``predicate`` attribute was added.
|
||||
|
||||
Examples
|
||||
@ -1416,7 +1416,7 @@ def check_any(*checks):
|
||||
|
||||
The ``predicate`` attribute for this function **is** a coroutine.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
------------
|
||||
@ -1489,7 +1489,7 @@ def has_role(item):
|
||||
is missing a role, or :exc:`.NoPrivateMessage` if it is used in a private message.
|
||||
Both inherit from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Raise :exc:`.MissingRole` or :exc:`.NoPrivateMessage`
|
||||
instead of generic :exc:`.CheckFailure`
|
||||
@ -1525,7 +1525,7 @@ def has_any_role(*items):
|
||||
is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message.
|
||||
Both inherit from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Raise :exc:`.MissingAnyRole` or :exc:`.NoPrivateMessage`
|
||||
instead of generic :exc:`.CheckFailure`
|
||||
@ -1564,7 +1564,7 @@ def bot_has_role(item):
|
||||
is missing the role, or :exc:`.NoPrivateMessage` if it is used in a private message.
|
||||
Both inherit from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Raise :exc:`.BotMissingRole` or :exc:`.NoPrivateMessage`
|
||||
instead of generic :exc:`.CheckFailure`
|
||||
@ -1593,7 +1593,7 @@ def bot_has_any_role(*items):
|
||||
is missing all roles, or :exc:`.NoPrivateMessage` if it is used in a private message.
|
||||
Both inherit from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Raise :exc:`.BotMissingAnyRole` or :exc:`.NoPrivateMessage`
|
||||
instead of generic checkfailure
|
||||
@ -1680,7 +1680,7 @@ def has_guild_permissions(**perms):
|
||||
If this check is called in a DM context, it will raise an
|
||||
exception, :exc:`.NoPrivateMessage`.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
def predicate(ctx):
|
||||
if not ctx.guild:
|
||||
@ -1700,7 +1700,7 @@ def bot_has_guild_permissions(**perms):
|
||||
"""Similar to :func:`.has_guild_permissions`, but checks the bot
|
||||
members guild permissions.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
def predicate(ctx):
|
||||
if not ctx.guild:
|
||||
@ -1724,7 +1724,7 @@ def dm_only():
|
||||
This check raises a special exception, :exc:`.PrivateMessageOnly`
|
||||
that is inherited from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
"""
|
||||
|
||||
def predicate(ctx):
|
||||
@ -1773,7 +1773,7 @@ def is_nsfw():
|
||||
This check raises a special exception, :exc:`.NSFWChannelRequired`
|
||||
that is derived from :exc:`.CheckFailure`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
|
||||
Raise :exc:`.NSFWChannelRequired` instead of generic :exc:`.CheckFailure`.
|
||||
DM channels will also now pass this check.
|
||||
@ -1826,7 +1826,7 @@ def max_concurrency(number, per=BucketType.default, *, wait=False):
|
||||
differs from a cooldown in that there is no set waiting period or token bucket -- only
|
||||
a set number of people can run the command.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
-------------
|
||||
|
@ -268,7 +268,7 @@ class MissingRole(CheckFailure):
|
||||
|
||||
This inherits from :exc:`CheckFailure`
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@ -286,7 +286,7 @@ class BotMissingRole(CheckFailure):
|
||||
|
||||
This inherits from :exc:`CheckFailure`
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@ -305,7 +305,7 @@ class MissingAnyRole(CheckFailure):
|
||||
|
||||
This inherits from :exc:`CheckFailure`
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@ -333,7 +333,7 @@ class BotMissingAnyRole(CheckFailure):
|
||||
|
||||
This inherits from :exc:`CheckFailure`
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@ -360,7 +360,7 @@ class NSFWChannelRequired(CheckFailure):
|
||||
|
||||
This inherits from :exc:`CheckFailure`.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -569,7 +569,7 @@ class ExtensionNotFound(ExtensionError):
|
||||
|
||||
This inherits from :exc:`ExtensionError`
|
||||
|
||||
.. versionchanged:: 1.3.0
|
||||
.. versionchanged:: 1.3
|
||||
Made the ``original`` attribute always None.
|
||||
|
||||
Attributes
|
||||
|
@ -117,7 +117,7 @@ class Loop:
|
||||
def next_iteration(self):
|
||||
"""Optional[:class:`datetime.datetime`]: When the next iteration of the loop will occur.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
if self._task is None and self._sleep:
|
||||
return None
|
||||
@ -171,7 +171,7 @@ class Loop:
|
||||
before stopping via :meth:`clear_exception_types` or
|
||||
use :meth:`cancel` instead.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
"""
|
||||
if self._task and not self._task.done():
|
||||
self._stop_next_iteration = True
|
||||
@ -274,7 +274,7 @@ class Loop:
|
||||
def failed(self):
|
||||
""":class:`bool`: Whether the internal task has failed.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
"""
|
||||
return self._has_failed
|
||||
|
||||
@ -342,7 +342,7 @@ class Loop:
|
||||
This only applies on the next loop iteration. If it is desirable for the change of interval
|
||||
to be applied right away, cancel the task with :meth:`cancel`.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Parameters
|
||||
------------
|
||||
|
@ -449,7 +449,7 @@ class Guild(Hashable):
|
||||
|
||||
If no channel is set, then this returns ``None``.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
channel_id = self._rules_channel_id
|
||||
return channel_id and self._channels.get(channel_id)
|
||||
@ -634,7 +634,7 @@ class Guild(Hashable):
|
||||
def discovery_splash_url(self):
|
||||
""":class:`Asset`: Returns the guild's discovery splash asset.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
return self.discovery_splash_url_as()
|
||||
|
||||
@ -644,7 +644,7 @@ class Guild(Hashable):
|
||||
The format must be one of 'webp', 'jpeg', 'jpg', or 'png'. The
|
||||
size must be a power of 2 between 16 and 4096.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -1104,7 +1104,7 @@ class Guild(Hashable):
|
||||
|
||||
This method is an API call. For general usage, consider :attr:`channels` instead.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Raises
|
||||
-------
|
||||
@ -1139,7 +1139,7 @@ class Guild(Hashable):
|
||||
|
||||
This method is an API call. For general usage, consider :attr:`members` instead.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
All parameters are optional.
|
||||
|
||||
@ -1508,7 +1508,7 @@ class Guild(Hashable):
|
||||
|
||||
This method is an API call. For general usage, consider :attr:`roles` instead.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Raises
|
||||
-------
|
||||
|
@ -53,7 +53,7 @@ class VoiceState:
|
||||
self_stream: :class:`bool`
|
||||
Indicates if the user is currently streaming via 'Go Live' feature.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
self_video: :class:`bool`
|
||||
Indicates if the user is currently broadcasting video.
|
||||
@ -511,7 +511,7 @@ class Member(discord.abc.Messageable, _BaseUser):
|
||||
|
||||
All parameters are optional.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
Can now pass ``None`` to ``voice_channel`` to kick a member from voice.
|
||||
|
||||
Parameters
|
||||
@ -589,7 +589,7 @@ class Member(discord.abc.Messageable, _BaseUser):
|
||||
|
||||
This raises the same exceptions as :meth:`edit`.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
Can now pass ``None`` to kick a member from voice.
|
||||
|
||||
Parameters
|
||||
|
@ -135,7 +135,7 @@ class Attachment:
|
||||
|
||||
Retrieves the content of this attachment as a :class:`bytes` object.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
.. versionadded:: 1.1
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -171,7 +171,7 @@ class Attachment:
|
||||
Converts the attachment into a :class:`File` suitable for sending via
|
||||
:meth:`abc.Messageable.send`.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Raises
|
||||
------
|
||||
@ -727,7 +727,7 @@ class Message:
|
||||
delete other people's messages, you need the :attr:`~Permissions.manage_messages`
|
||||
permission.
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.1
|
||||
Added the new ``delay`` keyword-only parameter.
|
||||
|
||||
Parameters
|
||||
|
@ -337,7 +337,7 @@ class Permissions(BaseFlags):
|
||||
def view_guild_insights(self):
|
||||
""":class:`bool`: Returns ``True`` if a user can view the guild's insights.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
return 1 << 19
|
||||
|
||||
|
@ -120,7 +120,7 @@ class FFmpegAudio(AudioSource):
|
||||
User created AudioSources using FFmpeg differently from how :class:`FFmpegPCMAudio` and
|
||||
:class:`FFmpegOpusAudio` work should subclass this.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
|
||||
def __init__(self, source, *, executable='ffmpeg', args, **subprocess_kwargs):
|
||||
@ -242,7 +242,7 @@ class FFmpegOpusAudio(FFmpegAudio):
|
||||
The same can be achieved by passing ``copy`` to the ``codec`` parameter, but only if you
|
||||
know that the input source is opus encoded beforehand.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
.. warning::
|
||||
|
||||
|
@ -85,7 +85,7 @@ class RawBulkMessageDeleteEvent(_RawReprMixin):
|
||||
class RawMessageUpdateEvent(_RawReprMixin):
|
||||
"""Represents the payload for a :func:`on_raw_message_edit` event.
|
||||
|
||||
.. versionchanged:: 1.3.0
|
||||
.. versionchanged:: 1.3
|
||||
The ``channel_id`` attribute was added.
|
||||
|
||||
Attributes
|
||||
@ -112,7 +112,7 @@ class RawReactionActionEvent(_RawReprMixin):
|
||||
"""Represents the payload for a :func:`on_raw_reaction_add` or
|
||||
:func:`on_raw_reaction_remove` event.
|
||||
|
||||
.. versionchanged:: 1.3.0
|
||||
.. versionchanged:: 1.3
|
||||
The ``event_type`` attribute was added.
|
||||
|
||||
Attributes
|
||||
@ -181,7 +181,7 @@ class RawReactionClearEvent(_RawReprMixin):
|
||||
class RawReactionClearEmojiEvent(_RawReprMixin):
|
||||
"""Represents the payload for a :func:`on_raw_reaction_clear_emoji` event.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
|
@ -342,13 +342,13 @@ async def sleep_until(when):
|
||||
"""Sleep until a specified time.
|
||||
|
||||
If the time supplied is in the past this function will yield instantly.
|
||||
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
when: :class:`datetime.datetime`
|
||||
The timestamp in which to sleep until.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionadded:: 1.3
|
||||
"""
|
||||
if when.tzinfo is None:
|
||||
when = when.replace(tzinfo=datetime.timezone.utc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user