Add group chat functions, slight refactoring

This commit is contained in:
Pedro Lopez
2019-02-20 02:42:19 -04:00
parent 594a65d5e8
commit 1b7376885d
12 changed files with 316 additions and 37 deletions

View File

@@ -0,0 +1,16 @@
'use strict';
const PrivateChat = require('../structures/PrivateChat');
const GroupChat = require('../structures/GroupChat');
class ChatFactory {
static create(client, data) {
if(data.isGroup) {
return new GroupChat(client, data);
}
return new PrivateChat(client, data);
}
}
module.exports = ChatFactory;