Table of Contents

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

client Client
data JsonObject
myId string

Properties

Data

生の JSON。

public JsonObject Data { get; }

Property Value

JsonObject

Id

会話 ID。1 対 1 の会話では 2 人の ID をソートしてダッシュで繋いだもの(相手-自分 ではないので 位置から相手を読み取れません。PartnerId を使ってください)。グループでは単なる ID。

public string Id { get; }

Property Value

string

IsGroup

グループの会話か。

public bool IsGroup { get; }

Property Value

bool

LastReadEventId

既読にした最後のイベントの ID。

public string? LastReadEventId { get; }

Property Value

string

Muted

ミュートされているか。

public bool Muted { get; }

Property Value

bool

Name

グループ名(1 対 1 の会話では null)。

public string? Name { get; }

Property Value

string

ParticipantIds

参加者全員の ID。自分自身との会話では自分が 1 回だけ含まれます。

public List<string> ParticipantIds { get; }

Property Value

List<string>

PartnerId

1 対 1 の会話の相手(自分自身との会話では自分の ID)。グループでは null。

public string? PartnerId { get; }

Property Value

string

Trusted

メッセージリクエストではなく信頼済みの受信箱にあるか。

public bool Trusted { get; }

Property Value

bool

Type

'ONE_TO_ONE' または 'GROUP_DM'。判定には IsGroup を使ってください。

public string? Type { get; }

Property Value

string

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Conversation?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Conversation? other)

Parameters

other Conversation

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

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

maxId string

Returns

Task<IReadOnlyList<Message>>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.