Method SendPaginatedMessageAsync
- Namespace
- DSharpPlus.Interactivity.Extensions
- Assembly
- DSharpPlus.Interactivity.dll
SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationEmojis, PaginationBehaviour?, PaginationDeletion?, TimeSpan?)
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)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that'll 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.
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'll 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'll 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'll 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 a new paginated message with buttons.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, TimeSpan? timeoutoverride, PaginationBehaviour? behaviour = null, ButtonPaginationBehavior? deletion = null)
Parameters
channelDiscordChannelTarget channel.
userDiscordUserThe user that'll be able to control the pages.
pagesIEnumerable<Page>A collection of Page to display.
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.