Class Conversation
- Namespace
- Twikit
- Assembly
- Twikit.dll
受信箱内の DM の会話。
public sealed class Conversation : IEquatable<Conversation>
- Inheritance
-
Conversation
- Implements
- Inherited Members
Constructors
Conversation(Client, JsonObject, string?)
public Conversation(Client client, JsonObject data, string? myId = null)
Parameters
clientClientdataJsonObjectmyIdstring
Properties
Data
生の JSON。
public JsonObject Data { get; }
Property Value
Id
会話 ID。1 対 1 の会話では 2 人の ID をソートしてダッシュで繋いだもの(相手-自分 ではないので
位置から相手を読み取れません。PartnerId を使ってください)。グループでは単なる ID。
public string Id { get; }
Property Value
IsGroup
グループの会話か。
public bool IsGroup { get; }
Property Value
LastReadEventId
既読にした最後のイベントの ID。
public string? LastReadEventId { get; }
Property Value
Muted
ミュートされているか。
public bool Muted { get; }
Property Value
Name
グループ名(1 対 1 の会話では null)。
public string? Name { get; }
Property Value
ParticipantIds
参加者全員の ID。自分自身との会話では自分が 1 回だけ含まれます。
public List<string> ParticipantIds { get; }
Property Value
PartnerId
1 対 1 の会話の相手(自分自身との会話では自分の ID)。グループでは null。
public string? PartnerId { get; }
Property Value
Trusted
メッセージリクエストではなく信頼済みの受信箱にあるか。
public bool Trusted { get; }
Property Value
Type
'ONE_TO_ONE' または 'GROUP_DM'。判定には IsGroup を使ってください。
public string? Type { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(Conversation?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Conversation? other)
Parameters
otherConversationAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetHistoryAsync(string?)
この会話のメッセージ履歴を取得します。
public Task<IReadOnlyList<Message>> GetHistoryAsync(string? maxId = null)
Parameters
maxIdstring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.