mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 21:42:05 +00:00
Indev rewrite - Changed GuildChannel type (#536)
* Altered GuildChannel.type to return a string containing either "text", "voice" or the id of the channel type. * Fixed typo * Altered code to pass ESLint test (Functionality Unchanged). * Third times the charm.
This commit is contained in:
parent
7892e62604
commit
cdb74a75f2
1 changed files with 4 additions and 2 deletions
|
|
@ -33,9 +33,11 @@ class GuildChannel extends Channel {
|
|||
super.setup(data);
|
||||
/**
|
||||
* The type of the Guild Channel
|
||||
* @type {Number}
|
||||
* @type {String}
|
||||
*/
|
||||
this.type = data.type;
|
||||
if (data.type === 0) this.type = 'text';
|
||||
else if (data.type === 2) this.type = 'voice';
|
||||
else this.type = data.type.toString();
|
||||
/**
|
||||
* The topic of the Guild Channel, if there is one.
|
||||
* @type {?String}
|
||||
|
|
|
|||
Loading…
Reference in a new issue