nyxx-discord / nyxx

Wrapper around Discord API for Dart
Apache License 2.0
326 stars 49 forks source link
api api-client api-wrapper bot dart dartdocs dartlang discord discord-api discord-bot nyxx pub

nyxx

Discord pub documentation

A complete, robust and efficient wrapper around Discord's API for bots & applications.

To get started using nyxx, follow our getting started guide to write your first bot.

If you're already familiar with Discord's API, here's a quick example to get you started:

import 'package:nyxx/nyxx.dart';

void main() async {
  final client = await Nyxx.connectGateway('<TOKEN>', GatewayIntents.allUnprivileged);

  final botUser = await client.users.fetchCurrentUser();

  client.onMessageCreate.listen((event) async {
    if (event.mentions.contains(botUser)) {
      await event.message.channel.sendMessage(MessageBuilder(
        content: 'You mentioned me!',
        replyId: event.message.id,
      ));
    }
  });
}

Other nyxx packages

More examples

Additional documentation & help

The API documentation for the latest stable version can be found on pub.

Docs and wiki

Tutorials and wiki articles are hosted here, as well as API documentation for development versions from GitHub.

Official nyxx Discord server

Our Discord server is where you can get help for any nyxx packages, as well as release announcements and discussions about the library.

Discord API docs

Discord's API documentation details what nyxx implements & provides more detailed explanations of certain topics.

Discord API Server

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

Pub.dev docs

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

Contributing to Nyxx

Read the contributing document

Credits