[Feature] Rework Thread property of a message (#2579)

* move `Thread` property to `IUserMessage` & add one to `SocketUserMessage`

* get channel from cache instead of creating new object

* move the property back to IMessage
This commit is contained in:
Misha133
2023-02-06 20:35:09 +03:00
committed by GitHub
parent e3da96fbf5
commit 0998285f83
3 changed files with 31 additions and 12 deletions

View File

@@ -89,6 +89,14 @@ namespace Discord
/// </summary>
IUser Author { get; }
/// <summary>
/// Gets the thread that was started from this message.
/// </summary>
/// <returns>
/// An <see cref="IThreadChannel"/> object if this message has thread attached; otherwise <see langword="null"/>.
/// </returns>
IThreadChannel Thread { get; }
/// <summary>
/// Gets all attachments included in this message.
/// </summary>