Skip to content
pubscout

nyxx

6.9.1, released 3 months ago by l7ssha.xyz

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

$ flutter pub add nyxx
Source repository

What it does

Provides a robust wrapper for Discord's API, allowing developers to build bots and applications that connect to the Discord Gateway, manage guilds, users, and handle events like messages and interactions.

AI-written summary of version 6.9.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Discord bot in Dart
  • You need to interact with Discord's REST and WebSocket Gateway APIs

Skip it when

  • You are not developing Discord-related applications
  • You need a UI component library or state management solution

Strengths

  • Complete implementation of Discord API features
  • Active maintenance with updates for new Discord gateway events and features
  • Includes stream-based event handling out of the box

Weaknesses

  • Requires platform-specific setup or native dependencies (like ffi and zstd_ffi)
  • Limited strictly to Discord bot and application development

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
9

Requires obtaining a Discord bot token and configuring appropriate Gateway intents.

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!',
        referencedMessage: MessageReferenceBuilder.reply(messageId: event.message.id),
      ));
    }
  });
}

Alternatives

Packages that do the same job and could replace nyxx.

  • televerse

    Telegram bot framework for Dart with strong typing and filter systems

  • ably_flutter

    A wrapper around Ably's client library SDKs for real-time messaging on iOS and Android.

  • agora_rtm

    Flutter wrapper around the Agora Real Time Message SDKs for Android and iOS.

  • dart_telegram_bot

    A Dart wrapper for the Telegram Bot API to send and receive messages.

Works with

Packages commonly used together with nyxx: ones it builds on, ones built on it, and its own family.