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
channel
DiscordChannelTarget channel.
user
DiscordUserThe user that'll be able to control the pages.
pages
IEnumerable<Page>A collection of Page to display.
emojis
PaginationEmojisPagination emojis.
behaviour
PaginationBehaviour?Pagination behaviour (when hitting max and min indices).
deletion
PaginationDeletion?Deletion behaviour.
timeoutoverride
TimeSpan?Override timeout period.
Returns
- Task
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
channel
DiscordChannelTarget channel.
user
DiscordUserThe user that'll be able to control the pages.
pages
IEnumerable<Page>A collection of Page to display.
buttons
PaginationButtonsPagination buttons (leave null to default to ones on configuration).
behaviour
PaginationBehaviour?Pagination behaviour.
deletion
ButtonPaginationBehavior?Deletion behaviour
token
CancellationTokenA custom cancellation token that can be cancelled at any point.
Returns
- Task
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
channel
DiscordChannelTarget channel.
user
DiscordUserThe user that'll be able to control the pages.
pages
IEnumerable<Page>A collection of Page to display.
behaviour
PaginationBehaviour?Pagination behaviour.
deletion
ButtonPaginationBehavior?Deletion behaviour
token
CancellationTokenA custom cancellation token that can be cancelled at any point.
Returns
- Task
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
channel
DiscordChannelTarget channel.
user
DiscordUserThe user that'll be able to control the pages.
pages
IEnumerable<Page>A collection of Page to display.
buttons
PaginationButtonsPagination buttons (leave null to default to ones on configuration).
timeoutoverride
TimeSpan?Override timeout period.
behaviour
PaginationBehaviour?Pagination behaviour.
deletion
ButtonPaginationBehavior?Deletion behaviour
Returns
- Task
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
channel
DiscordChannelTarget channel.
user
DiscordUserThe user that'll be able to control the pages.
pages
IEnumerable<Page>A collection of Page to display.
timeoutoverride
TimeSpan?Override timeout period.
behaviour
PaginationBehaviour?Pagination behaviour.
deletion
ButtonPaginationBehavior?Deletion behaviour
Returns
- Task
Exceptions
- InvalidOperationException
Thrown if interactivity is not enabled for the client associated with the channel.