Start work on adding reaction support

This commit is contained in:
Amish Shah
2016-10-27 15:22:42 +01:00
parent dd31ee0c5f
commit 81059885a2
12 changed files with 252 additions and 3 deletions

View File

@@ -44,6 +44,8 @@ class WebSocketPacketManager {
this.register(Constants.WSEvents.GUILD_SYNC, 'GuildSync');
this.register(Constants.WSEvents.RELATIONSHIP_ADD, 'RelationshipAdd');
this.register(Constants.WSEvents.RELATIONSHIP_REMOVE, 'RelationshipRemove');
this.register(Constants.WSEvents.MESSAGE_REACTION_ADD, 'MessageReactionAdd');
this.register(Constants.WSEvents.MESSAGE_REACTION_REMOVE, 'MessageReactionRemove');
}
get client() {

View File

@@ -0,0 +1,11 @@
const AbstractHandler = require('./AbstractHandler');
class MessageReactionAddHandler extends AbstractHandler {
handle(packet) {
const client = this.packetManager.client;
const data = packet.d;
client.actions.MessageReactionAdd.handle(data);
}
}
module.exports = MessageReactionAddHandler;

View File

@@ -0,0 +1,11 @@
const AbstractHandler = require('./AbstractHandler');
class MessageReactionRemove extends AbstractHandler {
handle(packet) {
const client = this.packetManager.client;
const data = packet.d;
client.actions.MessageReactionRemove.handle(data);
}
}
module.exports = MessageReactionRemove;