aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-01-18 21:37:06 -0500
committerRapptz <[email protected]>2020-01-18 21:37:06 -0500
commita1d41f16d81ec4edfb9db9f0107bef06fee8a819 (patch)
tree0d87b58d0106bcdd0ec740e05188c10f5703eb78
parent[commands] Document BucketType separately (diff)
downloaddiscord.py-a1d41f16d81ec4edfb9db9f0107bef06fee8a819.tar.xz
discord.py-a1d41f16d81ec4edfb9db9f0107bef06fee8a819.zip
Document NotFound exception raise in message deletion endpoints
-rw-r--r--discord/channel.py8
-rw-r--r--discord/message.py2
2 files changed, 7 insertions, 3 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 0456a1d3..2eb7b88b 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -224,7 +224,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
Raises
------
InvalidArgument
- If position is less than 0 or greater than the number of channels, or if
+ If position is less than 0 or greater than the number of channels, or if
the permission overwrite information is not in proper form.
Forbidden
You do not have permissions to edit the channel.
@@ -272,6 +272,8 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
Forbidden
You do not have proper permissions to delete the messages or
you're not using a bot account.
+ NotFound
+ If single delete, then the message was already deleted.
HTTPException
Deleting the messages failed.
"""
@@ -948,14 +950,14 @@ class StoreChannel(discord.abc.GuildChannel, Hashable):
The reason for editing this channel. Shows up on the audit log.
overwrites: :class:`dict`
A :class:`dict` of target (either a role or a member) to
- :class:`PermissionOverwrite` to apply to the channel.
+ :class:`PermissionOverwrite` to apply to the channel.
.. versionadded:: 1.3
Raises
------
InvalidArgument
- If position is less than 0 or greater than the number of channels, or if
+ If position is less than 0 or greater than the number of channels, or if
the permission overwrite information is not in proper form.
Forbidden
You do not have permissions to edit the channel.
diff --git a/discord/message.py b/discord/message.py
index 4010a2c3..dfd863a4 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -740,6 +740,8 @@ class Message:
------
Forbidden
You do not have proper permissions to delete the message.
+ NotFound
+ The message was deleted already
HTTPException
Deleting the message failed.
"""