dartcord 0.1.1

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)

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dartcord: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dartcord/dartcord.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
11
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
6
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Admin