summaryrefslogtreecommitdiff
path: root/desktop/node_modules/@xhayper/discord-rpc/dist/structures/Channel.js
blob: 0bff3935526d3109654aad9789bf789c2e2b4c64 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Channel = void 0;
const Message_1 = require("./Message");
const Base_1 = require("./Base");
class Channel extends Base_1.Base {
    /**
     * channel id
     */
    id;
    /**
     * channel's guild id
     */
    guild_id;
    /**
     * channel name
     */
    name;
    /**
     * channel type (guild text: 0, guild voice: 2, dm: 1, group dm: 3)
     */
    type;
    /**
     * (text) channel topic
     */
    topic;
    /**
     * (voice) bitrate of voice channel
     */
    bitrate;
    /**
     * (voice) user limit of voice channel (0 for none)
     */
    user_limit;
    /**
     * position of channel in channel list
     */
    position;
    /**
     * (voice) channel's voice states
     */
    voice_states;
    /**
     * (text) channel's messages
     */
    messages;
    constructor(client, props) {
        super(client);
        Object.assign(this, props);
        this.id = props.id;
        this.guild_id = props.guild_id;
        this.name = props.name;
        this.type = props.type;
        this.topic = props.topic;
        this.bitrate = props.bitrate;
        this.user_limit = props.user_limit;
        this.position = props.position;
        this.voice_states = props.voice_states;
        this.messages = props.messages?.map((messgeData) => new Message_1.Message(client, messgeData));
    }
}
exports.Channel = Channel;