/// <summary> /// Initializes a new instance of the <see cref="PaginatedMessageCallback"/> class. /// </summary> /// <param name="interactive"> /// The interactive service. /// </param> /// <param name="context"> /// The context. /// </param> /// <param name="pager"> /// The pager. /// </param> /// <param name="criterion"> /// The criterion. /// </param> public PaginatedMessageCallback(InteractiveService interactive, SocketCommandContext context, PaginatedMessage pager, ICriterion <SocketReaction> criterion = null) { Interactive = interactive; Context = context; Criterion = criterion ?? new EmptyCriterion <SocketReaction>(); _pager = pager; _pages = _pager.Pages?.Count() ?? default; }
/// <summary> /// Initializes a new instance of the <see cref="InlineReactionCallback"/> class. /// </summary> /// <param name="interactive"> /// The interactive service. /// </param> /// <param name="context"> /// The context. /// </param> /// <param name="data"> /// The callback data. /// </param> /// <param name="criterion"> /// The criterion. /// </param> public InlineReactionCallback( InteractiveService interactive, SocketCommandContext context, ReactionCallbackData data, ICriterion <SocketReaction> criterion = null) { _interactive = interactive; Context = context; _data = data; Criterion = criterion ?? new EmptyCriterion <SocketReaction>(); Timeout = data.Timeout ?? TimeSpan.FromSeconds(30); }