Added guildChannel.createInvite();

This commit is contained in:
Amish Shah
2016-08-28 20:32:32 +01:00
parent 9f1475f358
commit ba3d104619
6 changed files with 219 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
const Constants = require('../util/Constants');
/*
{ type: 0, id: '123123', name: 'heavy-testing' } }
*/
/**
* Represents a Guild Channel that the client only has limited information for - e.g. from invites.
*/
class PartialGuildChannel {
constructor(client, data) {
/**
* The client that instantiated this PartialGuildChannel
* @type {Client}
*/
this.client = client;
this.setup(data);
}
setup(data) {
/**
* The ID of this Guild Channel
* @type {String}
*/
this.id = data.id;
/**
* The name of this Guild Channel
* @type {String}
*/
this.name = data.name;
/**
* The type of this Guild Channel - `text` or `voice`
* @type {String}
*/
this.type = Constants.ChannelTypes.text === data.type ? 'text' : 'voice';
}
}
module.exports = PartialGuildChannel;