Class Message
- Namespace
- Twikit
- Assembly
- Twikit.dll
ダイレクトメッセージ。
public class Message : IEquatable<Message>
- Inheritance
-
Message
- Implements
- Derived
- Inherited Members
Constructors
Message(Client, JsonObject, string, string?)
public Message(Client client, JsonObject data, string senderId, string? recipientId)
Parameters
clientClientdataJsonObjectsenderIdstringrecipientIdstring
Fields
ClientRef
protected readonly Client ClientRef
Field Value
Properties
Attachment
添付の情報。
public JsonObject? Attachment { get; }
Property Value
AttachmentUrl
添付メディアの直接 URL(無ければ null)。
public string? AttachmentUrl { get; }
Property Value
Id
メッセージの ID。
public string Id { get; }
Property Value
RecipientId
受信者の ID(グループでは null)。
public string? RecipientId { get; }
Property Value
RepliedToId
返信元のメッセージ ID。
public string? RepliedToId { get; }
Property Value
RepliedToText
返信元のメッセージ本文。
public string? RepliedToText { get; }
Property Value
ReplyData
返信元のメッセージ(新規メッセージでは null)。
public JsonObject? ReplyData { get; }
Property Value
SenderId
送信者の ID。
public string SenderId { get; }
Property Value
Text
本文。
public string Text { get; }
Property Value
Time
タイムスタンプ。
public string? Time { get; }
Property Value
Methods
AddReactionAsync(string)
リアクションを追加します。
public virtual Task<HttpResponseMessage> AddReactionAsync(string emoji)
Parameters
emojistring
Returns
DeleteAsync()
メッセージを削除します。
public Task<HttpResponseMessage> DeleteAsync()
Returns
DownloadAttachmentAsync()
添付メディアをダウンロードします。X が Attachment に入れる URL は ton.twitter.com を 指しており公開 CDN ではないため、ログイン中のクライアントを通して取得します。
public Task<byte[]> DownloadAttachmentAsync()
Returns
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(Message?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Message? other)
Parameters
otherMessageAn 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.
RemoveReactionAsync(string)
リアクションを削除します。
public virtual Task<HttpResponseMessage> RemoveReactionAsync(string emoji)
Parameters
emojistring
Returns
ReplyAsync(string, string?)
このメッセージに返信します。
public virtual Task<Message> ReplyAsync(string text, string? mediaId = null)
Parameters
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.