Method SendPaginatedMessageAsync
- Namespace
- DisCatSharp.Interactivity.Extensions
- Assembly
- DisCatSharp.Interactivity.dll
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationEmojis, PaginationBehaviour?, PaginationDeletion?, TimeSpan?, CancellationToken)
Sends a new paginated message.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationEmojis emojis, PaginationBehaviour? behaviour = null, PaginationDeletion? deletion = null, TimeSpan? timeoutOverride = null, CancellationToken cancellationToken = default)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that will be able to control the pages.
pagesIEnumerable<Page>A collection of Page to display.
emojisPaginationEmojisPagination emojis.
behaviourPaginationBehaviour?Pagination behaviour (when hitting max and min indices).
deletionPaginationDeletion?Deletion behaviour.
timeoutOverrideTimeSpan?Override timeout period.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the pagination.
Returns
Exceptions
- InvalidOperationException
Thrown if interactivity is not enabled for the client associated with the channel.
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationButtons, PaginationBehaviour?, ButtonPaginationBehavior?, CancellationToken)
Sends a new paginated message with buttons.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationButtons buttons, PaginationBehaviour? behaviour = null, ButtonPaginationBehavior? deletion = null, CancellationToken token = default)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that will be able to control the pages.
pagesIEnumerable<Page>A collection of Page to display.
buttonsPaginationButtonsPagination buttons (leave null to default to ones on configuration).
behaviourPaginationBehaviour?Pagination behaviour.
deletionButtonPaginationBehavior?Deletion behaviour
tokenCancellationTokenA custom cancellation token that can be cancelled at any point.
Returns
Exceptions
- InvalidOperationException
Thrown if interactivity is not enabled for the client associated with the channel.
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationBehaviour?, ButtonPaginationBehavior?, CancellationToken)
Sends a new paginated message with buttons.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationBehaviour? behaviour = null, ButtonPaginationBehavior? deletion = null, CancellationToken token = default)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that will be able to control the pages.
pagesIEnumerable<Page>A collection of Page to display.
behaviourPaginationBehaviour?Pagination behaviour.
deletionButtonPaginationBehavior?Deletion behaviour
tokenCancellationTokenA custom cancellation token that can be cancelled at any point.
Returns
Exceptions
- InvalidOperationException
Thrown if interactivity is not enabled for the client associated with the channel.
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationButtons, TimeSpan?, PaginationBehaviour?, ButtonPaginationBehavior?)
Sends a new paginated message with buttons.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationButtons buttons, TimeSpan? timeoutOverride, PaginationBehaviour? behaviour = null, ButtonPaginationBehavior? deletion = null)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that will be able to control the pages.
pagesIEnumerable<Page>A collection of Page to display.
buttonsPaginationButtonsPagination buttons (leave null to default to ones on configuration).
timeoutOverrideTimeSpan?Override timeout period.
behaviourPaginationBehaviour?Pagination behaviour.
deletionButtonPaginationBehavior?Deletion behaviour.
Returns
Exceptions
- InvalidOperationException
Thrown if interactivity is not enabled for the client associated with the channel.
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, TimeSpan?, PaginationBehaviour?, ButtonPaginationBehavior?)
Sends the paginated message async.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, TimeSpan? timeoutOverride, PaginationBehaviour? behaviour = null, ButtonPaginationBehavior? deletion = null)
Parameters
channelDiscordChannelThe channel.
userDiscordUserThe user.
pagesIEnumerable<Page>The pages.
timeoutOverrideTimeSpan?Override timeout period.
behaviourPaginationBehaviour?The behaviour.
deletionButtonPaginationBehavior?The deletion.
Returns
- Task
A Task.