Beispiel #1
0
        /// <summary>
        ///     Sends a multi-pages Message
        /// </summary>
        /// <param name="context"></param>
        /// <param name="pager"></param>
        /// <param name="Reactions"></param>
        /// <param name="criterion"></param>
        /// <returns></returns>
        public async Task <IUserMessage> SendPaginatedMessageAsync(SocketCommandContext context, PaginatedMessage pager, ReactionList Reactions, ICriterion <SocketReaction> criterion = null)
        {
            var callback = new PaginatedMessageCallback(new InteractiveService(Discord.GetShardFor(context.Guild)), context, pager, criterion);
            await callback.DisplayAsync(Reactions).ConfigureAwait(false);

            return(callback.Message);
        }
Beispiel #2
0
        public async Task <IUserMessage> SendPaginatedMessageAsync(ShardedCommandContext context, PaginatedMessage pager, ICriterion <SocketReaction> criterion = null)
        {
            var callback = new PaginatedMessageCallback(this, context, pager, criterion);
            await callback.DisplayAsync().ConfigureAwait(false);

            return(callback.Message);
        }
Beispiel #3
0
        public async Task <Message> SendPaginatedMessageAsync(EspeonContext context, PaginatedMessage pager)
        {
            var callback = new PaginatedMessageCallback(this, context, pager);
            await callback.DisplayAsync().ConfigureAwait(false);

            return(callback.Message);
        }
Beispiel #4
0
        public async ValueTask <IUserMessage> SendPaginatedMessageAsync(VolteContext context,
                                                                        PaginatedMessage pager,
                                                                        ICriterion <SocketReaction> criterion = null)
        {
            var callback = new PaginatedMessageCallback(this, context, pager, criterion);

            _activePagers.Enqueue(callback);
            await callback.DisplayAsync();

            return(callback.Message);
        }