/// <summary> /// コンストラクタ。 /// </summary> /// <param name="reaction">リアクション</param> /// <param name="message">メッセージ</param> /// <param name="users">ReactionLogIDとユーザ一覧</param> public ReactionLogCollection(Reaction reaction, Message message, List <ReactionLog>?users = null) { this.Reaction = reaction; this.Users = users ?? new List <ReactionLog>(); // リアクション追加、削除時のイベント設定 this.OnReactionAdded += (_, reaction) => MessageService.AddReaction(message, reaction); this.OnReactionRemoved += (_, reactionLog) => MessageService.RemoveReaction(message, reactionLog); }