dartcord

dartcord is an API wrapper and Dart client for the Discord API.
It makes full use of await/async syntax and asynchronous Future.

Installation

Add dartcord to your pubspec:

dependencies:
    dartcord: "^0.1.0"

Example

var client = new dartcord.Client("MyToken");
client.onMessage.listen((e) async {
  var m = e.message;
  if (m.content == "!ping") {
    await m.reply("Pong!");
  }
 });
client.onReady.listen((e) async {
  print("Ready! Logged in as: " + e.client.user.username);
});

await client.start();

Roadmap

  • Embed support Done
  • Overhaul WebSocket & REST(?) system
  • Add more events
  • Replace sharding system
  • Voice support

Contributing

Please use async/await syntax and latest Dart conventions. For testing, the following variables must be set: DISCORD_TOKEN (set to your testing bot's token) and TESTING_CHAN_ID (the tests send messages, so pick a channel that the bot has send, edit and manage messages).

Fork

dartcord is a fork of Nyx (https://github.com/Hackzzila/nyx)

Libraries

dartcord