Wrapper around Discord API for Dart
APACHE-2.0 License
Bot releases are hidden (Show)
Published by l7ssha over 6 years ago
delay()
in Command classPublished by l7ssha over 6 years ago
Published by l7ssha over 6 years ago
Snowflake
typePublished by l7ssha over 6 years ago
This version brings big API changes:
Commands
class divided into MirrorsCommandFramework
and InstanceCommandFramework
.Command
class has now context instead of Message
object in method call.Commands
now can into subcommand via MirrorsCommandFramework
Commands
can create currying calls. delay()
methods provides ability to wait for another input from user.Emojis
big update - now adding, removing reactions and sending emojis are full supported.UnicodeEmojis
which contains about 1k of unicode emojis ready for you use.Published by l7ssha over 6 years ago
This patch fixes few bugs and updates codebase:
Published by l7ssha over 6 years ago
I forgot to create this release, so it's few days late, but whatever 😄
This version includes:
bulkRemoveMessages
Published by l7ssha over 6 years ago
This version drastically changes API from 0.18.0
from overriding handler class to simply listeting to streams:
Stream<Message> commandNotFoundEvent;
Stream<Message> forAdminOnlyEvent;
Stream<Message> requiredPermissionEvent;
To make use of streams just listen to it:
var commandsListener = new discord.Commands('~~', bot)
..add(new TestCommand())
..commandNotFoundEvent.listen((m) {
m.channel.sendMessage(content: "Command '${m.content}' not found!");
});
Published by l7ssha over 6 years ago
This version adds few dartdocs documentation and more important - adds command event handlers.
EventHandler is class which contains method to handle errors when dispatching command
abstract class EventHandler {
Future commandNotFound(Message message);
Future forAdminOnly(Message message);
Future requiredPermission(Message message);
}
Override this class and add to CommandFramework instance:
var commandsListener = new discord.Commands('~~', bot)
..add(new TestCommand())
..eventHandler = new CustomEventHandler();
Published by l7ssha over 6 years ago
In this version:
ICommand
interface is removed.Published by l7ssha over 6 years ago
This updates added property in Commands
class. It allows to proccess all bots messages too - be carefull with this - you can create message loop.
With this settings your bot will proccess all messages:
var commandsHandler = new discord.Command('~~', client)
...ignoreBots = false;
Published by l7ssha over 6 years ago
This version includes:
dispatch
pipe for CommandFrameworkdartanalyzer
few bugs