nyxx_lavalink 3.2.0 copy "nyxx_lavalink: ^3.2.0" to clipboard
nyxx_lavalink: ^3.2.0 copied to clipboard

Nyxx Lavalink Module

nyxx_lavalink #

Discord Shield pub documentation

Simple, robust framework for creating discord bots for Dart language.


Features #

  • Lavalink support
    Nyxx allows you to create music bots by adding support to Lavalink API
  • Fine Control
    Nyxx allows you to control every outgoing HTTP request or WebSocket message.

Quick example #

Lavalink

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

  final guildId = Snowflake("GUILD_ID");
  final channelId = Snowflake("CHANNEL_ID");

  final cluster = ICluster.createCluster(bot, Snowflake("BOT_ID"));
  await cluster.addNode(NodeOptions());

  bot.eventsWs.onMessageReceived.listen((event) async {
    if (event.message.content == "!join") {
      final channel = await bot.fetchChannel<IVoiceGuildChannel>(channelId);

      cluster.getOrCreatePlayerNode(guildId);

      channel.connect();
    } else {
      final node = cluster.getOrCreatePlayerNode(guildId);

      final searchResults = await node.searchTracks(event.message.content);

      node.play(guildId, searchResults.tracks[0]).queue();
    }
  });
}

Other nyxx packages #

More examples #

Nyxx examples can be found here.

Example bots #

Documentation, help and examples #

Dartdoc documentation for latest stable version is hosted on pub

Docs and wiki

You can read docs and wiki articles for latest stable version on my website. This website also hosts docs for latest dev changes to framework (dev branch)

Official nyxx discord server

If you need assistance in developing bot using nyxx you can join official nyxx discord guild.

Discord API docs

Discord API documentation features rich descriptions about all topics that nyxx covers.

Discord API Guild

The unofficial guild for Discord Bot developers. To get help with nyxx check #dart_nyxx channel.

Dartdocs

The dartdocs page will always have the documentation for the latest release.

Contributing to Nyxx #

Read contributing document

Credits #