nyxx 0.24.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 56


Build Status Pub documentation

Simple, robust framework for creating discord bots for Dart.
Fork of Hackzzila's nyx - extended with new functionality, few bug fixes, applied pending pull requests.


Features #

  • Commands framework
    Faster way of creating commands for bot. You just have to implement one class, and initialize framework. Everything is done automatically.
  • Cross Platform
    Nyxx works on the command line, browser, mobile.
  • Fine Control
    Nyxx allows you to control every outgoing HTTP request or websocket messages.
  • Internal Sharding
    Nyxx automatically spawns shards for your bot, but you can override this and spawn a custom number of shards. Internal sharding means that all of your bots servers are managed in one script, no need for communication between shards.
  • Complete
    Nyxx supports nearly all DiscordAPI endpoints.

Sample #

void main() {
  discord.Client bot =
      new discord.Client(Platform.environment['DISCORD_TOKEN']);

  bot.onReady.listen((discord.ReadyEvent e) {
    print("Ready!");
  });

  bot.onMessage.listen((discord.MessageEvent e) {
    if (e.message.content == "!ping") {
      e.message.channel.sendMessage(content: "Pong!");
    }
  });
}

Documentation and examples #

Dartdocs #

Latest docs for newest release.

Dev docs #

My website has docs for latests commits - You can read about incoming changes

Wiki #

Wiki docs are designed to match latest release.

Roadmap #

  • [ ] Better dartdocs documentation
  • [x] More examples at wiki/more tutorial/Video tutorial
  • [ ] Bigger bot written in nyxx for example
  • [ ] Fix lint errors from dartanalyzer
  • [x] Annotation driver flow for CommandsFramework?
  • [x] Recheck all code and fix styling/small logic bugs
  • [ ] Support for Voice connection

0.24.0 #

Tue 03.08.2018

  • Changes

    • nyxx now supports Dart 2.0
    • Added Interactivity module
    • Added few methods to CommandContext
    • Rewritten CooldownCache
  • Bug fixes

    • Fixed Command help generating error
    • Fixed Emojis equals operator

0.23.1 #

Tue 31.07.2018

  • Bug fixes
    • Fixed MessageDeleteEvent deserializing error
    • Fixed checking for channel nsfw for CommandsFramework

0.23.0 #

Mon 30.07.2018

  • New features
    • Support for services - DEPENDENCY INJECTION
    • Support for type parsing
    • Logging support
    • Listener for messages for channel
    • Automatic registering Services and Commands
    • Remainder annotation which captures all remaining text
    • Permissions are now READ/WRITE - added PermissionsBuilder
    • Checking for topics and if channel is nsfw for commands
  • Bug fixes
    • Fixed error throwing
    • Text in quotes is one String
    • Fixed StreamControllers to be broadcast
    • Removed unnecessary fields from DMChannel and GroupDMChannel
    • Big performance improvement of CommandFramework
    • Fixed Permissions opcode
    • delay() changed to nextMessage()
  • Deprecations
    • Deprecated browser target
    • Removed MirrorsCommandFramework and InstanceCommandFramework

0.22.1 #

Wed 11.07.2018

  • Bug fixes
    • Fixed bug with sending Emoji. toString() now return proper representation ready to send via message
  • New features
    • Searching in EmojisUnicode is now handled by future.
    • toString() in User, Channel, Role now returns mention instead of content, name etc.

0.22.0 #

Wed 11.07.2018

  • Bug fixes
    • Next serialization bug fixes
  • New features
    • Added support for audit logs
    • Searching in EmojisUnicode based on shortcode

0.21.5 #

Fri 09.07.2018

  • Bug fixes
    • Fixed embed serialization

0.21.4 #

Fri 09.07.2018

  • Bug fixes
    • Fixed embed serialization

0.21.3 #

Fri 08.07.2018

  • Bug fixes
    • Fixed embed serialization
  • Added few Docs

0.21.2 #

Fri 06.07.2018

  • Bug fixes
    • Added overrides
    • Implemented hashCode
    • Fixed return type for delay() in Command class

0.21.1 #

Fri 06.07.2018

  • Bug fixes
    • Fixed constructors in MessageChannel and TextChannel

0.21.0 #

Fri 06.07.2018

  • New features
    • Support for sending files, attaching files in embed
    • Added missing gateway events
    • Replaced String ids with Snowflake type
  • Bug fixes

Use this package as a library

1. Depend on it

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


dependencies:
  nyxx: ^0.24.0

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:nyxx/nyxx.dart';
  
Version Uploaded Documentation Archive
0.30.0 Feb 10, 2019 Go to the documentation of nyxx 0.30.0 Download nyxx 0.30.0 archive
0.24.0 Aug 3, 2018 Go to the documentation of nyxx 0.24.0 Download nyxx 0.24.0 archive
0.23.1 Jul 31, 2018 Go to the documentation of nyxx 0.23.1 Download nyxx 0.23.1 archive
0.23.0 Jul 30, 2018 Go to the documentation of nyxx 0.23.0 Download nyxx 0.23.0 archive
0.22.1 Jul 13, 2018 Go to the documentation of nyxx 0.22.1 Download nyxx 0.22.1 archive
0.22.0 Jul 11, 2018 Go to the documentation of nyxx 0.22.0 Download nyxx 0.22.0 archive
0.21.5 Jul 9, 2018 Go to the documentation of nyxx 0.21.5 Download nyxx 0.21.5 archive
0.21.4 Jul 9, 2018 Go to the documentation of nyxx 0.21.4 Download nyxx 0.21.4 archive
0.21.3 Jul 8, 2018 Go to the documentation of nyxx 0.21.3 Download nyxx 0.21.3 archive
0.21.2 Jul 6, 2018 Go to the documentation of nyxx 0.21.2 Download nyxx 0.21.2 archive

All 22 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
39
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
91
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

We analyzed this package on May 30, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.17

Platforms

Detected platforms: other

Primary library: package:nyxx/nyxx.dart with components: io, mirrors.

Health suggestions

Fix lib/src/objects/Guild.dart. (-10.89 points)

Analysis of lib/src/objects/Guild.dart reported 23 hints, including:

line 99 col 9: DO use curly braces for all flow control structures.

line 138 col 13: DO use curly braces for all flow control structures.

line 171 col 32: Use = to separate a named parameter from its default value.

line 171 col 50: Use = to separate a named parameter from its default value.

line 173 col 7: DO use curly braces for all flow control structures.

Fix lib/src/commands/CommandsFramework.dart. (-8.17 points)

Analysis of lib/src/commands/CommandsFramework.dart reported 17 hints, including:

line 104 col 9: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

line 183 col 7: DO use curly braces for all flow control structures.

line 187 col 7: DO use curly braces for all flow control structures.

line 254 col 16: DO use curly braces for all flow control structures.

line 256 col 7: DO use curly braces for all flow control structures.

Fix lib/src/objects/Role.dart. (-6.31 points)

Analysis of lib/src/objects/Role.dart reported 13 hints, including:

line 67 col 8: Don't explicitly initialize variables to null.

line 67 col 19: Use = to separate a named parameter from its default value.

line 69 col 7: Don't explicitly initialize variables to null.

line 69 col 19: Use = to separate a named parameter from its default value.

line 70 col 7: Don't explicitly initialize variables to null.

Fix additional 27 files with analysis or formatting issues. (-66.30 points)

Additional issues in the following files:

  • lib/src/commands/CommandContext.dart (12 hints)
  • lib/src/objects/ClientUser.dart (12 hints)
  • lib/src/objects/channel/TextChannel.dart (12 hints)
  • lib/src/objects/Shard.dart (11 hints)
  • lib/src/internal/Http.dart (10 hints)
  • lib/src/objects/channel/MessageChannel.dart (10 hints)
  • lib/src/commands/Interactivity.dart (9 hints)
  • lib/src/objects/ClientOptions.dart (8 hints)
  • lib/src/objects/channel/VoiceChannel.dart (8 hints)
  • lib/src/objects/embed/Embed.dart (8 hints)
  • lib/src/objects/Member.dart (7 hints)
  • lib/src/objects/User.dart (4 hints)
  • lib/src/builders/EmbedBuilder.dart (2 hints)
  • lib/src/builders/EmbedFieldBuilder.dart (2 hints)
  • lib/src/builders/PermissionsBuilder.dart (2 hints)
  • lib/src/commands/Annotations.dart (2 hints)
  • lib/src/events/MessageReactionEvent.dart (2 hints)
  • lib/src/objects/Webhook.dart (2 hints)
  • lib/src/objects/channel/GuildChannel.dart (2 hints)
  • lib/src/objects/message/Message.dart (2 hints)
  • lib/src/objects/message/Reaction.dart (2 hints)
  • lib/src/Client.dart (1 hint)
  • lib/src/events/GuildCreateEvent.dart (1 hint)
  • lib/src/internal/_WS.dart (1 hint)
  • lib/src/objects/Game.dart (1 hint)
  • lib/src/objects/auditlogs/AuditLogEntry.dart (1 hint)
  • lib/src/objects/channel/Channel.dart (1 hint)

Maintenance suggestions

The package description is too short. (-9 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and nyxx.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
http_parser >=3.0.0 <4.0.0 3.1.3
logging ^0.11.3+2 0.11.3+2
w_transport >=3.0.0 <4.0.0 3.2.8
Transitive dependencies
args 1.5.1
async 2.2.0
charcode 1.1.2
cli_repl 0.2.0+1
collection 1.14.11
dart2_constant 1.0.2+dart2
fluri 1.2.5
glob 1.1.7
http 0.12.0+2
intl 0.15.8
js 0.6.1+1
matcher 0.12.5
meta 1.1.7
mime 0.9.6+3
package_config 1.0.5
package_resolver 1.0.10
path 1.6.2
pedantic 1.7.0
quiver 2.0.3
sass 1.20.1
sockjs_client 0.3.5
sockjs_client_wrapper 1.0.8
source_maps 0.10.8
source_span 1.5.5
stack_trace 1.9.3
stream_transform 0.0.19
string_scanner 1.0.4
term_glyph 1.1.0
tuple 1.0.2
typed_data 1.1.6
w_common 1.17.0
watcher 0.9.7+10
Dev dependencies
dart_style any