nyxx_pagination 2.0.0-dev.0 copy "nyxx_pagination: ^2.0.0-dev.0" to clipboard
nyxx_pagination: ^2.0.0-dev.0 copied to clipboard

discontinuedreplaced by: nyxx_extensions
outdated

Pagination utility for nyxx library

example/example.dart

import "dart:async";

import "package:nyxx/nyxx.dart";
import 'package:nyxx_interactions/nyxx_interactions.dart';
import "package:nyxx_pagination/nyxx_pagination.dart";

FutureOr<void> paginationExampleInteraction(ISlashCommandInteractionEvent event) {
  final paginator = EmbedComponentPagination(event.interactions, [
    EmbedBuilder()..description = "This is first page",
    EmbedBuilder()..description = "This is second page",
  ]);

  event.respond(paginator.initMessageBuilder());
}

void main() {
  final bot = NyxxFactory.createNyxxWebsocket("<TOKEN>", GatewayIntents.allUnprivileged);

  IInteractions.create(WebsocketInteractionBackend(bot))
    ..registerSlashCommand(SlashCommandBuilder("paginated", "This is pagination example", [], guild: 302360552993456135.toSnowflake())
      ..registerHandler(paginationExampleInteraction))
    ..syncOnReady();
}
1
likes
0
points
26
downloads

Publisher

verified publisherl7ssha.xyz

Weekly Downloads

Pagination utility for nyxx library

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

nyxx, nyxx_interactions, random_string

More

Packages that depend on nyxx_pagination