Skip to content

Commit

Permalink
Suspending paginator builders
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Nov 6, 2023
1 parent 7164f5d commit 3556a98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public interface EphemeralInteractionContext : InteractionContext<
}

@AlwaysPublicResponse
public override fun respondingPaginator(
public override suspend fun respondingPaginator(
defaultGroup: String,
locale: Locale?,
builder: (PaginatorBuilder).() -> Unit,
builder: suspend PaginatorBuilder.() -> Unit,
): PublicFollowUpPaginator {
val pages = PaginatorBuilder(locale = locale, defaultGroup = defaultGroup)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public interface InteractionContext<
* This function always creates a public follow-up, as Discord prevents bots from editing ephemeral follow-ups.
*/
@AlwaysPublicResponse
public fun respondingPaginator(
public suspend fun respondingPaginator(
defaultGroup: String = "",
locale: Locale? = null,
builder: (PaginatorBuilder).() -> Unit,
builder: suspend (PaginatorBuilder).() -> Unit,
): BaseButtonPaginator

/** Edit the original interaction response. **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public interface PublicInteractionContext : InteractionContext<
}

@AlwaysPublicResponse
public override fun respondingPaginator(
public override suspend fun respondingPaginator(
defaultGroup: String,
locale: Locale?,
builder: (PaginatorBuilder).() -> Unit,
builder: suspend PaginatorBuilder.() -> Unit,
): PublicFollowUpPaginator {
val pages = PaginatorBuilder(locale = locale, defaultGroup = defaultGroup)

Expand Down

0 comments on commit 3556a98

Please sign in to comment.