nyxx

nyxx-discordApache-2.0活跃维护

用 Dart 封装 Discord API 的客户端库,方便开发者快速构建 Discord 机器人和集成应用,省去手动处理底层 HTTP 与网关细节。

Wrapper around Discord API for Dart

v6.9.1发布于 2026-08-10 16:08 UTC345star54fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
dart pub add nyxx
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Dart 编写的 Discord API 封装库,帮你快速写机器人和应用

用 Dart 封装 Discord API 的客户端库,方便开发者快速构建 Discord 机器人和集成应用,省去手动处理底层 HTTP 与网关细节。

核心能力

  • 用 Nyxx.connectGateway 一行连上网关
  • 监听 onMessageCreate 事件处理消息
  • 内置 MessageBuilder 构造并回复消息
  • 配套 commands、extensions、lavalink 扩展包

容易踩的坑

需自备 Discord Bot Token 才能连接网关;示例使用 GatewayIntents.allUnprivileged,需要特权意图的功能要另行申请并开启

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v6.9.1
  1. v6.9.16.9.1最新正式版2026-08-10 · 2026-08-10 16:08 UTC

    What's Changed

    Full Changelog: https://github.com/nyxx-discord/nyxx/compare/v6.9.0...v6.9.1

  2. v6.9.0+16.9.0+12026-05-30 · 2026-05-30 11:33 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/nyxx-discord/nyxx/compare/v6.9.0...v6.9.0+1

  3. v6.9.06.9.02026-05-05 · 2026-05-05 09:30 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/nyxx-discord/nyxx/compare/6.8.1...v6.9.0

  4. nyxx-6.8.16.8.12026-02-01 · 2026-02-01 14:36 UTC

    这个版本没有写更新说明。

  5. nyxx-6.8.06.8.02026-01-23 · 2026-01-23 20:43 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/nyxx-discord/nyxx/compare/nyxx-6.7.0...nyxx-6.8.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

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

    Other nyxx packages

    • nyxx_commands: A command framework for handling both simple & complex commands.
    • nyxx_extensions: Pagination, emoji utilities and other miscellaneous helpers for developing bots using nyxx.
    • nyxx_lavalink: Lavalink support for playing audio in voice channels.

    More examples

    • More examples can be found in our GitHub repository here.
    • Running on Dart is a complete example of a bot written with nyxx.

    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.

    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

    • Thanks to Hackzzila's for nyx, the original project nyxx was forked from.