/
HelixChatSettings.ts
69 lines (61 loc) · 1.67 KB
/
HelixChatSettings.ts
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
63
64
65
66
67
68
69
import { DataObject, rawDataSymbol, rtfm } from '@twurple/common';
import { type HelixChatSettingsData } from '../../interfaces/endpoints/chat.external';
/**
* The settings of a broadcaster's chat.
*/
@rtfm<HelixChatSettings>('api', 'HelixChatSettings', 'broadcasterId')
export class HelixChatSettings extends DataObject<HelixChatSettingsData> {
/**
* The ID of the broadcaster.
*/
get broadcasterId(): string {
return this[rawDataSymbol].broadcaster_id;
}
/**
* Whether slow mode is enabled.
*/
get slowModeEnabled(): boolean {
return this[rawDataSymbol].slow_mode;
}
/**
* The time to wait between messages in slow mode, in seconds.
*
* Is `null` if slow mode is not enabled.
*/
get slowModeDelay(): number | null {
return this[rawDataSymbol].slow_mode_wait_time;
}
/**
* Whether follower only mode is enabled.
*/
get followerOnlyModeEnabled(): boolean {
return this[rawDataSymbol].follower_mode;
}
/**
* The time after which users are able to send messages after following, in minutes.
*
* Is `null` if follower only mode is not enabled,
* but may also be `0` if you can send messages immediately after following.
*/
get followerOnlyModeDelay(): number | null {
return this[rawDataSymbol].follower_mode_duration;
}
/**
* Whether subscriber only mode is enabled.
*/
get subscriberOnlyModeEnabled(): boolean {
return this[rawDataSymbol].subscriber_mode;
}
/**
* Whether emote only mode is enabled.
*/
get emoteOnlyModeEnabled(): boolean {
return this[rawDataSymbol].emote_mode;
}
/**
* Whether unique chat mode is enabled.
*/
get uniqueChatModeEnabled(): boolean {
return this[rawDataSymbol].unique_chat_mode;
}
}