nyxx_commander 3.0.1 copy "nyxx_commander: ^3.0.1" to clipboard
nyxx_commander: ^3.0.1 copied to clipboard

discontinuedreplaced by: nyxx_commands

Nyxx Commander Module. Discord library for Dart. Simple, robust framework for creating discord bots for Dart language.

example/example.dart

import "package:nyxx/nyxx.dart";
import "package:nyxx_commander/nyxx_commander.dart";

void main() {
  // Start bot
  final bot = NyxxFactory.createNyxxWebsocket("<TOKEN>", GatewayIntents.allUnprivileged)
    ..registerPlugin(Logging()) // Default logging plugin
    ..registerPlugin(CliIntegration()) // Cli integration for nyxx allows stopping application via SIGTERM and SIGKILl
    ..registerPlugin(IgnoreExceptions()) // Plugin that handles uncaught exceptions that may occur
    ..connect();

  // Start commander with prefix `!`
  ICommander.create(bot, mentionPrefixHandler)
    .registerCommand("ping", (context, message) { // register command ping that will answer pong
      context.reply(MessageBuilder.content("Pong"));
    });
}
6
likes
125
points
29
downloads

Publisher

verified publisherl7ssha.xyz

Weekly Downloads

Nyxx Commander Module. Discord library for Dart. Simple, robust framework for creating discord bots for Dart language.

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

http, logging, nyxx

More

Packages that depend on nyxx_commander