nyxx
一個完整、強大且高效的核心包,用於機器人與應用程式之 Discord API。
Dart 的 Discord API 包裝器
以下為英文專案原文快照,最新內容請造訪 GitHub。
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),
));
}
});
}
The API documentation for the latest stable version can be found on pub.
Tutorials and wiki articles are hosted here.
Our Discord server is where you can get help for any nyxx packages, as well as release announcements and discussions about the library.
Discord's API documentation details what nyxx implements & provides more detailed explanations of certain topics.
The unofficial guild for Discord Bot developers. To get help with nyxx check #dart_nyxx channel.
The dartdocs page will always have the documentation for the latest release.
Read the contributing document