Add group chat functions, slight refactoring

This commit is contained in:
Pedro Lopez 2019-02-20 02:42:19 -04:00
commit 1b7376885d

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;