summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/structures/DirectoryChannel.js
blob: 870eff955a90ef9f24c8b4ce3ff2ca32c0564ffe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict';

const { BaseChannel } = require('./BaseChannel');

/**
 * Represents a channel that displays a directory of guilds.
 * @extends {BaseChannel}
 */
class DirectoryChannel extends BaseChannel {
  constructor(guild, data, client) {
    super(client, data);

    /**
     * The guild the channel is in
     * @type {InviteGuild}
     */
    this.guild = guild;

    /**
     * The id of the guild the channel is in
     * @type {Snowflake}
     */
    this.guildId = guild.id;
  }

  _patch(data) {
    super._patch(data);
    /**
     * The channel's name
     * @type {string}
     */
    this.name = data.name;
  }
}

module.exports = DirectoryChannel;