From 525ee4be0af9ae7b24252597fce81acee832df7d Mon Sep 17 00:00:00 2001 From: iDutchy Date: Fri, 2 Oct 2020 00:34:01 +0000 Subject: [PATCH] update docs --- README.rst | 2 ++ discord/channel.py | 1 + discord/client.py | 4 ++++ docs/index.rst | 2 ++ 4 files changed, 9 insertions(+) diff --git a/README.rst b/README.rst index dc6d1b26..9c03940f 100644 --- a/README.rst +++ b/README.rst @@ -21,6 +21,8 @@ Custom Features - Merged in ext-colors (https://github.com/MGardne8/DiscordPyColours) - Using Rapptz/discord.py/tree/neo-docs for documentation - Adding support for ``hex()`` to ``discord.Color`` +- Added ``Client.embed_color`` / ``Bot.embed_color`` +- Added ``TextChannel.can_send`` Key Features ------------- diff --git a/discord/channel.py b/discord/channel.py index 4c758d26..50effab0 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -144,6 +144,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): @property def can_send(self): + """:class:`bool`: Checks if the bot can send messages""" return self.guild.me.guild_permissions.send_messages def permissions_for(self, member): diff --git a/discord/client.py b/discord/client.py index 13d2b893..c68c7d82 100644 --- a/discord/client.py +++ b/discord/client.py @@ -221,6 +221,10 @@ class Client: sync your system clock to Google's NTP server. .. versionadded:: 1.3 + embed_color: Union[:class:`.Colour`, :class:`int`] + The default embed color you want to use when initialising a :class:`.Embed`. This will + remove the need to set the color per embed, but can still be overridden by setting a + color while creating an instance of an embed. Attributes ----------- diff --git a/docs/index.rst b/docs/index.rst index e3d27876..9a7c185c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -26,6 +26,8 @@ Custom Features - Merged in ext-colors (https://github.com/MGardne8/DiscordPyColours) - Using Rapptz/discord.py/tree/neo-docs for documentation - Adding support for ``hex()`` to ``discord.Color`` +- Added ``Client.embed_color`` / ``Bot.embed_color`` +- Added ``TextChannel.can_send`` Features --------