forked from discordjs/discord.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StageChannel.js
36 lines (31 loc) · 928 Bytes
/
StageChannel.js
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 BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel');
/**
* Represents a guild stage channel on Discord.
* @extends {BaseGuildVoiceChannel}
*/
class StageChannel extends BaseGuildVoiceChannel {
_patch(data) {
super._patch(data);
if ('topic' in data) {
/**
* The topic of the stage channel
* @type {?string}
*/
this.topic = data.topic;
}
}
/**
* Sets the RTC region of the channel.
* @name StageChannel#setRTCRegion
* @param {?string} region The new region of the channel. Set to `null` to remove a specific region for the channel
* @returns {Promise<StageChannel>}
* @example
* // Set the RTC region to europe
* stageChannel.setRTCRegion('europe');
* @example
* // Remove a fixed region for this channel - let Discord decide automatically
* stageChannel.setRTCRegion(null);
*/
}
module.exports = StageChannel;