dartcord 0.1.0 dartcord: ^0.1.0 copied to clipboard
An API wrapper and client for the Discord API
discord.dart #
discord.dart
is an API wrapper and Dart client for the Discord API.
It makes full use of await/async syntax and asynchronous Future
.
Installation #
Add discord.dart
to your pubspec:
dependencies:
discord.dart: "^0.1.0"
Example #
var client = new discord.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 supportDone- 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 #
discord.dart is a fork of Nyx (https://github.com/Hackzzila/nyx)