Document TextChannel.start_thread return type

This commit is contained in:
Rapptz 2021-07-03 11:48:41 -04:00
parent 3d0dd5bc1b
commit 8b4dd34328
2 changed files with 10 additions and 0 deletions

View File

@ -668,6 +668,11 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
You do not have permissions to start a thread.
HTTPException
Starting the thread failed.
Returns
--------
:class:`Thread`
The started thread
"""
if message is None:

View File

@ -1475,6 +1475,11 @@ class Message(Hashable):
Starting the thread failed.
InvalidArgument
This message does not have guild info attached.
Returns
--------
:class:`.Thread`
The started thread.
"""
if self.guild is None:
raise InvalidArgument('This message does not have guild info attached.')