internal PageBuilder WithPaginatorFooter(PaginatorFooter footer, int page, int totalPages, IList <SocketUser> users) { if (footer.HasFlag(PaginatorFooter.None)) { return(this); } Footer = new EmbedFooterBuilder(); if (footer.HasFlag(PaginatorFooter.Users)) { if (users.Count == 0) { Footer.Text += "Interactors : Everyone\n"; } if (users.Count == 1) { var user = users.First(); Footer.IconUrl = user.GetAvatarUrl(); Footer.Text += $"Interactor : {user}\n"; } else { Footer.Text += $"Interactors : {string.Join(", ", users)}"; } } if (footer.HasFlag(PaginatorFooter.PageNumber)) { Footer.Text += $"Page {page + 1}/{totalPages + 1}"; } return(this); }
/// <summary> /// Sets the footer in the <see cref="Embed"/> of the <see cref="Paginator"/>. /// </summary> /// <returns></returns> public new StaticPaginatorBuilder WithFooter(PaginatorFooter footer) => base.WithFooter(footer) as StaticPaginatorBuilder;
/// <summary> /// Sets the footer in the <see cref="Embed"/> of the <see cref="Paginator"/>. /// </summary> /// <returns></returns> public new LazyPaginatorBuilder WithFooter(PaginatorFooter footer) => base.WithFooter(footer) as LazyPaginatorBuilder;
protected PaginatorBuilder WithFooter(PaginatorFooter footer) { Footer = footer; return(this); }