搜索插件、代码仓与 APP 分类

插件详情v6.9.1

nyxx

一个完整、强大且高效的 Discord API 封装,适用于机器人和应用程序。

AndroidiOSmacOSWindowsLinux
近 30 天下载
1850
喜欢数
109
Pub 分数
140

安装插件

flutter pub add nyxx

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Nyxx 是一个全面、高效且可靠的 Dart 库,可为构建机器人和应用程序提供对 Discord API 的完整访问。该库旨在兼顾性能与可靠性,支持实时交互、事件处理以及管理服务器、用户和消息的丰富功能。该包适用于希望在多个平台上创建功能丰富的 Discord 集成的开发者。其简洁的 API 和活跃的社区支持使其成为初学者和资深开发者的理想选择。

适合场景

  • 构建 Discord 机器人
  • 创建实时聊天应用
  • 将 Discord 集成到多平台应用中
  • 管理服务器自动化
  • 处理消息事件和反应

主要特点

  • 完整的 Discord API 支持
  • 实时事件流
  • 跨平台支持
  • 高效的资源使用
  • 强大的错误处理
  • 模块化设计

适合对象

  • Discord机器人开发者
  • 多平台应用程序创建者
  • 实时通信项目
  • 服务器自动化工具
  • 面向 Discord 集成的 Dart/Flutter 开发者

使用建议

  • 需要了解 Discord API
  • 可能需要额外的设置来完成身份验证
  • 依赖于稳定的网络连接
  • 高级功能的学习曲线
  • 不适用于面向用户的 Discord 客户端

原始 README

以下为关联源码仓库的 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.

所属分类

依赖

依赖清单 9 项

源码仓库

使用此插件的项目

暂无相关数据。