Table of Contents

Class ThreadExtensions

Namespace
Kook
Assembly
Kook.Net.Core.dll

提供用于各种帖子相关实体的扩展方法。

public static class ThreadExtensions
Inheritance
ThreadExtensions
Inherited Members

Methods

GetJumpUrl(IThread)

获取一个跳转到帖子的 URL。

public static string GetJumpUrl(this IThread thread)

Parameters

thread IThread

要获取跳转 URL 的帖子。

Returns

string

一个包含用于在聊天中跳转到帖子的 URL 的字符串。

GetJumpUrl(IThreadPost)

获取一个跳转到帖子回复的 URL。

public static string GetJumpUrl(this IThreadPost post)

Parameters

post IThreadPost

要获取跳转 URL 的帖子回复。

Returns

string

一个包含用于在聊天中跳转到帖子的 URL 的字符串。

GetJumpUrl(IThreadReply)

获取一个跳转到帖子回复评论的 URL。

public static string GetJumpUrl(this IThreadReply reply)

Parameters

reply IThreadReply

要获取跳转 URL 的帖子回复评论。

Returns

string

一个包含用于在聊天中跳转到帖子的 URL 的字符串。

TryExtractCardContent(IThread, out string?)

尝试将帖子内卡片的内容展开为单个字符串。

public static bool TryExtractCardContent(this IThread thread, out string? extractedContent)

Parameters

thread IThread

要展开的消息。

extractedContent string

展开的帖子。

Returns

bool

如果成功展开,则为 true;否则为 false

TryExtractCardContent(IThreadPost, out string?)

尝试将帖子评论内卡片的内容展开为单个字符串。

public static bool TryExtractCardContent(this IThreadPost post, out string? extractedContent)

Parameters

post IThreadPost

要展开的帖子评论。

extractedContent string

展开的内容。

Returns

bool

如果成功展开,则为 true;否则为 false

TryExtractCardContent(IThreadReply, out string?)

尝试将帖子评论内卡片的内容展开为单个字符串。

public static bool TryExtractCardContent(this IThreadReply reply, out string? extractedContent)

Parameters

reply IThreadReply

要展开的帖子评论。

extractedContent string

展开的内容。

Returns

bool

如果成功展开,则为 true;否则为 false