Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Interactions subpackage for nyxx_library

nyxx_interactions

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


Features

Quick example

Basic usage:

void main() {
  final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);

  bot.onMessageReceived.listen((event) {
    if (event.message.content == "!ping") {
      event.message.channel.sendMessage(MessageBuilder.content("Pong!"));
    }
  });
}

Slash commands:

void main() {
  final bot = Nyxx("<%TOKEN%>", GatewayIntents.allUnprivileged);
  final interactions = Interactions(bot);

  interactions
    ..registerHandler("test", "This is test comamnd", [], handler: (event) async {
      await event.reply(MessageBuilder.content("This is example message result"));
    });
}

Commands:

void main() {
  final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);

  Commander(bot, prefix: "!!!")
    ..registerCommand("ping", (context, message) => context.reply(MessageBuilder.content("Pong!")));
}

More examples

Nyxx examples can be found here.

Commander examples can be found here

Slash commands (interactions) examples can be found here

Example bots

Documentation, help and examples

Dartdoc documentation is hosted on pub. This wiki just fills gap in docs with more descriptive guides and tutorials.

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.

Dev docs

You can read about upcoming changes in the library on my website.

Wiki

Wiki documentation are designed to match the latest Nyxx release.

Contributing to Nyxx

Read contributing document

Contribute & Download the source code on GitHub

Exit mobile version
Skip to toolbar