@buape/carbon 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/dist/package.json +1 -1
- package/dist/src/abstracts/BaseChannel.d.ts +22 -21
- package/dist/src/abstracts/BaseChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseChannel.js +37 -27
- package/dist/src/abstracts/BaseChannel.js.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +3 -2
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.js +3 -4
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseGuildChannel.d.ts +12 -10
- package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseGuildChannel.js +35 -22
- package/dist/src/abstracts/BaseGuildChannel.js.map +1 -1
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts +13 -9
- package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -1
- package/dist/src/abstracts/BaseGuildTextChannel.js +25 -9
- package/dist/src/abstracts/BaseGuildTextChannel.js.map +1 -1
- package/dist/src/abstracts/BaseInteraction.d.ts +7 -23
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.js +12 -12
- package/dist/src/abstracts/BaseInteraction.js.map +1 -1
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +14 -13
- package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -1
- package/dist/src/abstracts/GuildThreadOnlyChannel.js +31 -16
- package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -1
- package/dist/src/classes/Button.d.ts +0 -4
- package/dist/src/classes/Button.d.ts.map +1 -1
- package/dist/src/classes/Button.js +6 -0
- package/dist/src/classes/Button.js.map +1 -1
- package/dist/src/classes/Client.d.ts +35 -0
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +52 -0
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/factories/channelFactory.d.ts +1 -1
- package/dist/src/factories/channelFactory.d.ts.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.d.ts +2 -3
- package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.js +2 -8
- package/dist/src/internals/AutocompleteInteraction.js.map +1 -1
- package/dist/src/internals/CommandHandler.d.ts.map +1 -1
- package/dist/src/internals/CommandHandler.js +4 -2
- package/dist/src/internals/CommandHandler.js.map +1 -1
- package/dist/src/internals/CommandInteraction.d.ts +3 -4
- package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
- package/dist/src/internals/CommandInteraction.js +6 -12
- package/dist/src/internals/CommandInteraction.js.map +1 -1
- package/dist/src/internals/ModalInteraction.d.ts +3 -2
- package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
- package/dist/src/internals/ModalInteraction.js +3 -3
- package/dist/src/internals/ModalInteraction.js.map +1 -1
- package/dist/src/internals/OptionsHandler.d.ts +8 -12
- package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
- package/dist/src/internals/OptionsHandler.js +27 -9
- package/dist/src/internals/OptionsHandler.js.map +1 -1
- package/dist/src/structures/DmChannel.d.ts +7 -6
- package/dist/src/structures/DmChannel.d.ts.map +1 -1
- package/dist/src/structures/DmChannel.js +7 -6
- package/dist/src/structures/DmChannel.js.map +1 -1
- package/dist/src/structures/GroupDmChannel.d.ts +17 -19
- package/dist/src/structures/GroupDmChannel.d.ts.map +1 -1
- package/dist/src/structures/GroupDmChannel.js +48 -41
- package/dist/src/structures/GroupDmChannel.js.map +1 -1
- package/dist/src/structures/Guild.d.ts +29 -28
- package/dist/src/structures/Guild.d.ts.map +1 -1
- package/dist/src/structures/Guild.js +82 -57
- package/dist/src/structures/Guild.js.map +1 -1
- package/dist/src/structures/GuildAnnouncementChannel.d.ts +3 -4
- package/dist/src/structures/GuildAnnouncementChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildAnnouncementChannel.js +1 -3
- package/dist/src/structures/GuildAnnouncementChannel.js.map +1 -1
- package/dist/src/structures/GuildCategoryChannel.d.ts +3 -3
- package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildCategoryChannel.js +0 -1
- package/dist/src/structures/GuildCategoryChannel.js.map +1 -1
- package/dist/src/structures/GuildForumChannel.d.ts +4 -3
- package/dist/src/structures/GuildForumChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildForumChannel.js +4 -3
- package/dist/src/structures/GuildForumChannel.js.map +1 -1
- package/dist/src/structures/GuildMediaChannel.d.ts +3 -7
- package/dist/src/structures/GuildMediaChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildMediaChannel.js +1 -6
- package/dist/src/structures/GuildMediaChannel.js.map +1 -1
- package/dist/src/structures/GuildMember.d.ts +28 -26
- package/dist/src/structures/GuildMember.d.ts.map +1 -1
- package/dist/src/structures/GuildMember.js +95 -57
- package/dist/src/structures/GuildMember.js.map +1 -1
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +12 -11
- package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildStageOrVoiceChannel.js +22 -13
- package/dist/src/structures/GuildStageOrVoiceChannel.js.map +1 -1
- package/dist/src/structures/GuildTextChannel.d.ts +6 -6
- package/dist/src/structures/GuildTextChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildTextChannel.js +9 -7
- package/dist/src/structures/GuildTextChannel.js.map +1 -1
- package/dist/src/structures/GuildThreadChannel.d.ts +14 -13
- package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -1
- package/dist/src/structures/GuildThreadChannel.js +59 -28
- package/dist/src/structures/GuildThreadChannel.js.map +1 -1
- package/dist/src/structures/Message.d.ts +50 -41
- package/dist/src/structures/Message.d.ts.map +1 -1
- package/dist/src/structures/Message.js +163 -93
- package/dist/src/structures/Message.js.map +1 -1
- package/dist/src/structures/Role.d.ts +27 -25
- package/dist/src/structures/Role.d.ts.map +1 -1
- package/dist/src/structures/Role.js +100 -61
- package/dist/src/structures/Role.js.map +1 -1
- package/dist/src/structures/User.d.ts +34 -32
- package/dist/src/structures/User.d.ts.map +1 -1
- package/dist/src/structures/User.js +97 -64
- package/dist/src/structures/User.js.map +1 -1
- package/dist/src/types.d.ts +37 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils.d.ts +16 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +9 -0
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2,78 +2,124 @@ import { Base } from "../abstracts/Base.js";
|
|
|
2
2
|
import { Role } from "./Role.js";
|
|
3
3
|
import { User } from "./User.js";
|
|
4
4
|
export class GuildMember extends Base {
|
|
5
|
+
constructor(client, rawData, guild) {
|
|
6
|
+
super(client);
|
|
7
|
+
this.rawData = rawData;
|
|
8
|
+
this.guild = guild;
|
|
9
|
+
this.user = new User(client, rawData.user);
|
|
10
|
+
this.setData(rawData);
|
|
11
|
+
}
|
|
12
|
+
rawData = null;
|
|
13
|
+
setData(data) {
|
|
14
|
+
if (!data)
|
|
15
|
+
throw new Error("Cannot set data without having data... smh");
|
|
16
|
+
this.rawData = data;
|
|
17
|
+
}
|
|
18
|
+
setField(key, value) {
|
|
19
|
+
if (!this.rawData)
|
|
20
|
+
throw new Error("Cannot set field without having data... smh");
|
|
21
|
+
Reflect.set(this.rawData, key, value);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The guild object of the member.
|
|
25
|
+
*/
|
|
26
|
+
guild;
|
|
27
|
+
/**
|
|
28
|
+
* The user object of the member.
|
|
29
|
+
*/
|
|
30
|
+
user;
|
|
5
31
|
/**
|
|
6
32
|
* The guild-specific nickname of the member.
|
|
7
33
|
*/
|
|
8
|
-
nickname
|
|
34
|
+
get nickname() {
|
|
35
|
+
if (!this.rawData)
|
|
36
|
+
return undefined;
|
|
37
|
+
return this.rawData.nick ?? null;
|
|
38
|
+
}
|
|
9
39
|
/**
|
|
10
40
|
* The guild-specific avatar hash of the member.
|
|
11
41
|
* You can use {@link GuildMember.avatarUrl} to get the URL of the avatar.
|
|
12
42
|
*/
|
|
13
|
-
avatar
|
|
43
|
+
get avatar() {
|
|
44
|
+
if (!this.rawData)
|
|
45
|
+
return undefined;
|
|
46
|
+
return this.rawData.avatar ?? null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get the URL of the member's guild-specific avatar
|
|
50
|
+
*/
|
|
51
|
+
get avatarUrl() {
|
|
52
|
+
if (!this.rawData)
|
|
53
|
+
return undefined;
|
|
54
|
+
if (!this.user || !this.avatar)
|
|
55
|
+
return null;
|
|
56
|
+
return `https://cdn.discordapp.com/guilds/${this.guild.id}/users/${this.user.id}/${this.avatar}.png`;
|
|
57
|
+
}
|
|
14
58
|
/**
|
|
15
59
|
* Is this member muted in Voice Channels?
|
|
16
60
|
*/
|
|
17
|
-
mute
|
|
61
|
+
get mute() {
|
|
62
|
+
if (!this.rawData)
|
|
63
|
+
return undefined;
|
|
64
|
+
return this.rawData.mute;
|
|
65
|
+
}
|
|
18
66
|
/**
|
|
19
67
|
* Is this member deafened in Voice Channels?
|
|
20
68
|
*/
|
|
21
|
-
deaf
|
|
69
|
+
get deaf() {
|
|
70
|
+
if (!this.rawData)
|
|
71
|
+
return undefined;
|
|
72
|
+
return this.rawData.deaf;
|
|
73
|
+
}
|
|
22
74
|
/**
|
|
23
75
|
* The date since this member boosted the guild, if applicable.
|
|
24
76
|
*/
|
|
25
|
-
premiumSince
|
|
77
|
+
get premiumSince() {
|
|
78
|
+
if (!this.rawData)
|
|
79
|
+
return undefined;
|
|
80
|
+
return this.rawData.premium_since ?? null;
|
|
81
|
+
}
|
|
26
82
|
/**
|
|
27
83
|
* The flags of the member.
|
|
28
84
|
* @see https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
|
|
29
85
|
*/
|
|
30
|
-
flags
|
|
86
|
+
get flags() {
|
|
87
|
+
if (!this.rawData)
|
|
88
|
+
return undefined;
|
|
89
|
+
return this.rawData.flags;
|
|
90
|
+
}
|
|
31
91
|
/**
|
|
32
92
|
* The roles of the member
|
|
33
93
|
*/
|
|
34
|
-
roles
|
|
94
|
+
get roles() {
|
|
95
|
+
if (!this.rawData)
|
|
96
|
+
return undefined;
|
|
97
|
+
const roles = this.rawData.roles ?? [];
|
|
98
|
+
return roles.map((role) => new Role(this.client, role));
|
|
99
|
+
}
|
|
35
100
|
/**
|
|
36
101
|
* The joined date of the member
|
|
37
102
|
*/
|
|
38
|
-
joinedAt
|
|
103
|
+
get joinedAt() {
|
|
104
|
+
if (!this.rawData)
|
|
105
|
+
return undefined;
|
|
106
|
+
return this.rawData.joined_at;
|
|
107
|
+
}
|
|
39
108
|
/**
|
|
40
109
|
* The date when the member's communication privileges (timeout) will be reinstated
|
|
41
110
|
*/
|
|
42
|
-
communicationDisabledUntil
|
|
111
|
+
get communicationDisabledUntil() {
|
|
112
|
+
if (!this.rawData)
|
|
113
|
+
return undefined;
|
|
114
|
+
return this.rawData.communication_disabled_until ?? null;
|
|
115
|
+
}
|
|
43
116
|
/**
|
|
44
117
|
* Is this member yet to pass the guild's Membership Screening requirements?
|
|
45
118
|
*/
|
|
46
|
-
pending
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
guild;
|
|
51
|
-
/**
|
|
52
|
-
* The user object of the member
|
|
53
|
-
*/
|
|
54
|
-
user;
|
|
55
|
-
rawData = null;
|
|
56
|
-
constructor(client, rawData, guild) {
|
|
57
|
-
super(client);
|
|
58
|
-
this.rawData = rawData;
|
|
59
|
-
this.guild = guild;
|
|
60
|
-
this.setData(rawData);
|
|
61
|
-
}
|
|
62
|
-
setData(data) {
|
|
63
|
-
if (!data)
|
|
64
|
-
throw new Error("Cannot set data without having data... smh");
|
|
65
|
-
this.rawData = data;
|
|
66
|
-
this.nickname = data.nick;
|
|
67
|
-
this.avatar = data.avatar;
|
|
68
|
-
this.mute = data.mute;
|
|
69
|
-
this.deaf = data.deaf;
|
|
70
|
-
this.premiumSince = data.premium_since;
|
|
71
|
-
this.flags = data.flags;
|
|
72
|
-
this.roles = data.roles?.map((roleId) => new Role(this.client, roleId));
|
|
73
|
-
this.joinedAt = data.joined_at;
|
|
74
|
-
this.communicationDisabledUntil = data.communication_disabled_until;
|
|
75
|
-
this.pending = data.pending;
|
|
76
|
-
this.user = data.user ? new User(this.client, data.user) : null;
|
|
119
|
+
get pending() {
|
|
120
|
+
if (!this.rawData)
|
|
121
|
+
return undefined;
|
|
122
|
+
return this.rawData.pending ?? false;
|
|
77
123
|
}
|
|
78
124
|
/**
|
|
79
125
|
* Set the nickname of the member
|
|
@@ -84,7 +130,7 @@ export class GuildMember extends Base {
|
|
|
84
130
|
nick: nickname
|
|
85
131
|
}
|
|
86
132
|
});
|
|
87
|
-
this.
|
|
133
|
+
this.setField("nick", nickname);
|
|
88
134
|
}
|
|
89
135
|
/**
|
|
90
136
|
* Add a role to the member
|
|
@@ -98,7 +144,9 @@ export class GuildMember extends Base {
|
|
|
98
144
|
*/
|
|
99
145
|
async removeRole(roleId) {
|
|
100
146
|
await this.client.rest.delete(`/guilds/${this.guild?.id}/members/${this.user?.id}/roles/${roleId}`);
|
|
101
|
-
|
|
147
|
+
const roles = this.roles?.filter((role) => role.id !== roleId);
|
|
148
|
+
if (roles)
|
|
149
|
+
this.setField("roles", roles);
|
|
102
150
|
}
|
|
103
151
|
/**
|
|
104
152
|
* Kick the member from the guild
|
|
@@ -126,7 +174,7 @@ export class GuildMember extends Base {
|
|
|
126
174
|
mute: true
|
|
127
175
|
}
|
|
128
176
|
});
|
|
129
|
-
this.mute
|
|
177
|
+
this.setField("mute", true);
|
|
130
178
|
}
|
|
131
179
|
/**
|
|
132
180
|
* Unmute a member in voice channels
|
|
@@ -137,7 +185,7 @@ export class GuildMember extends Base {
|
|
|
137
185
|
mute: false
|
|
138
186
|
}
|
|
139
187
|
});
|
|
140
|
-
this.mute
|
|
188
|
+
this.setField("mute", false);
|
|
141
189
|
}
|
|
142
190
|
/**
|
|
143
191
|
* Deafen a member in voice channels
|
|
@@ -148,7 +196,7 @@ export class GuildMember extends Base {
|
|
|
148
196
|
deaf: true
|
|
149
197
|
}
|
|
150
198
|
});
|
|
151
|
-
this.deaf
|
|
199
|
+
this.setField("deaf", true);
|
|
152
200
|
}
|
|
153
201
|
/**
|
|
154
202
|
* Undeafen a member in voice channels
|
|
@@ -159,7 +207,7 @@ export class GuildMember extends Base {
|
|
|
159
207
|
deaf: false
|
|
160
208
|
}
|
|
161
209
|
});
|
|
162
|
-
this.deaf
|
|
210
|
+
this.setField("deaf", false);
|
|
163
211
|
}
|
|
164
212
|
/**
|
|
165
213
|
* Set or remove a timeout for a member in the guild
|
|
@@ -170,17 +218,7 @@ export class GuildMember extends Base {
|
|
|
170
218
|
communication_disabled_until: communicationDisabledUntil
|
|
171
219
|
}
|
|
172
220
|
});
|
|
173
|
-
this.
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Get the URL of the member's guild-specific avatar
|
|
177
|
-
*/
|
|
178
|
-
get avatarUrl() {
|
|
179
|
-
if (!this.user)
|
|
180
|
-
return null;
|
|
181
|
-
return this.avatar
|
|
182
|
-
? `https://cdn.discordapp.com/guilds/${this.guild.id}/users/${this.user?.id}/${this.avatar}.png`
|
|
183
|
-
: null;
|
|
221
|
+
this.setField("communication_disabled_until", communicationDisabledUntil);
|
|
184
222
|
}
|
|
185
223
|
}
|
|
186
224
|
//# sourceMappingURL=GuildMember.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildMember.js","sourceRoot":"","sources":["../../../src/structures/GuildMember.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,E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E,EAAE,YAAY,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EACpD;YACC,IAAI,EAAE;gBACL,4BAA4B,EAAE,0BAA0B;aACxD;SACD,CACD,CAAA;QACD,IAAI,CAAC,QAAQ,CAAC,8BAA8B,EAAE,0BAA0B,CAAC,CAAA;IAC1E,CAAC;CACD"}
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type APIGuildStageVoiceChannel, type APIGuildVoiceChannel, type ChannelType, VideoQualityMode } from "discord-api-types/v10";
|
|
2
2
|
import { BaseGuildChannel } from "../abstracts/BaseGuildChannel.js";
|
|
3
|
-
|
|
3
|
+
import type { IfPartial } from "../utils.js";
|
|
4
|
+
export declare abstract class GuildStageOrVoiceChannel<Type extends ChannelType.GuildStageVoice | ChannelType.GuildVoice, IsPartial extends boolean = false> extends BaseGuildChannel<Type, IsPartial> {
|
|
5
|
+
rawData: APIGuildStageVoiceChannel | APIGuildVoiceChannel | null;
|
|
4
6
|
/**
|
|
5
7
|
* The bitrate of the channel.
|
|
6
8
|
*/
|
|
7
|
-
bitrate
|
|
9
|
+
get bitrate(): IfPartial<IsPartial, number | undefined>;
|
|
8
10
|
/**
|
|
9
11
|
* The user limit of the channel.
|
|
10
12
|
*/
|
|
11
|
-
userLimit
|
|
13
|
+
get userLimit(): IfPartial<IsPartial, number | undefined>;
|
|
12
14
|
/**
|
|
13
15
|
* The RTC region of the channel.
|
|
14
16
|
* This is automatic when set to `null`.
|
|
15
17
|
*/
|
|
16
|
-
rtcRegion
|
|
18
|
+
get rtcRegion(): IfPartial<IsPartial, string | null>;
|
|
17
19
|
/**
|
|
18
20
|
* The video quality mode of the channel.
|
|
19
21
|
* 1 when not present.
|
|
20
22
|
*/
|
|
21
|
-
videoQualityMode
|
|
22
|
-
protected setSpecificData(data: APIGuildStageVoiceChannel | APIGuildVoiceChannel): void;
|
|
23
|
+
get videoQualityMode(): IfPartial<IsPartial, VideoQualityMode>;
|
|
23
24
|
}
|
|
24
|
-
export declare class GuildStageChannel extends
|
|
25
|
-
|
|
25
|
+
export declare class GuildStageChannel<IsPartial extends boolean = false> extends GuildStageOrVoiceChannel<ChannelType.GuildStageVoice, IsPartial> {
|
|
26
|
+
rawData: APIGuildStageVoiceChannel | null;
|
|
26
27
|
}
|
|
27
|
-
export declare class GuildVoiceChannel extends
|
|
28
|
-
|
|
28
|
+
export declare class GuildVoiceChannel<IsPartial extends boolean = false> extends GuildStageOrVoiceChannel<ChannelType.GuildVoice, IsPartial> {
|
|
29
|
+
rawData: APIGuildVoiceChannel | null;
|
|
29
30
|
}
|
|
30
31
|
//# sourceMappingURL=GuildStageOrVoiceChannel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildStageOrVoiceChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildStageOrVoiceChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"GuildStageOrVoiceChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildStageOrVoiceChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,gBAAgB,EAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,8BAAsB,wBAAwB,CAC7C,IAAI,SAAS,WAAW,CAAC,eAAe,GAAG,WAAW,CAAC,UAAU,EACjE,SAAS,SAAS,OAAO,GAAG,KAAK,CAChC,SAAQ,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC;IAElC,OAAO,EAAE,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,CAAA;IAExE;;OAEG;IACH,IAAI,OAAO,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAGtD;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAGxD;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAGnD;IAED;;;OAGG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAG7D;CACD;AAED,qBAAa,iBAAiB,CAC7B,SAAS,SAAS,OAAO,GAAG,KAAK,CAChC,SAAQ,wBAAwB,CAAC,WAAW,CAAC,eAAe,EAAE,SAAS,CAAC;IACjE,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAAA;CACjD;AACD,qBAAa,iBAAiB,CAC7B,SAAS,SAAS,OAAO,GAAG,KAAK,CAChC,SAAQ,wBAAwB,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC;IAC5D,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAA;CAC5C"}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
+
import { VideoQualityMode } from "discord-api-types/v10";
|
|
1
2
|
import { BaseGuildChannel } from "../abstracts/BaseGuildChannel.js";
|
|
2
3
|
export class GuildStageOrVoiceChannel extends BaseGuildChannel {
|
|
3
4
|
/**
|
|
4
5
|
* The bitrate of the channel.
|
|
5
6
|
*/
|
|
6
|
-
bitrate
|
|
7
|
+
get bitrate() {
|
|
8
|
+
if (!this.rawData)
|
|
9
|
+
return undefined;
|
|
10
|
+
return this.rawData.bitrate;
|
|
11
|
+
}
|
|
7
12
|
/**
|
|
8
13
|
* The user limit of the channel.
|
|
9
14
|
*/
|
|
10
|
-
userLimit
|
|
15
|
+
get userLimit() {
|
|
16
|
+
if (!this.rawData)
|
|
17
|
+
return undefined;
|
|
18
|
+
return this.rawData.user_limit;
|
|
19
|
+
}
|
|
11
20
|
/**
|
|
12
21
|
* The RTC region of the channel.
|
|
13
22
|
* This is automatic when set to `null`.
|
|
14
23
|
*/
|
|
15
|
-
rtcRegion
|
|
24
|
+
get rtcRegion() {
|
|
25
|
+
if (!this.rawData)
|
|
26
|
+
return undefined;
|
|
27
|
+
return this.rawData.rtc_region ?? null;
|
|
28
|
+
}
|
|
16
29
|
/**
|
|
17
30
|
* The video quality mode of the channel.
|
|
18
31
|
* 1 when not present.
|
|
19
32
|
*/
|
|
20
|
-
videoQualityMode
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
this.rtcRegion = data.rtc_region;
|
|
25
|
-
this.videoQualityMode = data.video_quality_mode;
|
|
33
|
+
get videoQualityMode() {
|
|
34
|
+
if (!this.rawData)
|
|
35
|
+
return undefined;
|
|
36
|
+
return this.rawData.video_quality_mode ?? VideoQualityMode.Auto;
|
|
26
37
|
}
|
|
27
38
|
}
|
|
28
|
-
export class GuildStageChannel extends
|
|
29
|
-
setSpecificData() { }
|
|
39
|
+
export class GuildStageChannel extends GuildStageOrVoiceChannel {
|
|
30
40
|
}
|
|
31
|
-
export class GuildVoiceChannel extends
|
|
32
|
-
setSpecificData() { }
|
|
41
|
+
export class GuildVoiceChannel extends GuildStageOrVoiceChannel {
|
|
33
42
|
}
|
|
34
43
|
//# sourceMappingURL=GuildStageOrVoiceChannel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildStageOrVoiceChannel.js","sourceRoot":"","sources":["../../../src/structures/GuildStageOrVoiceChannel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GuildStageOrVoiceChannel.js","sourceRoot":"","sources":["../../../src/structures/GuildStageOrVoiceChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,gBAAgB,EAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAGnE,MAAM,OAAgB,wBAGpB,SAAQ,gBAAiC;IAI1C;;OAEG;IACH,IAAI,OAAO;QACV,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAA;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACZ,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAA;IAC/B,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACZ,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,IAAI,CAAA;IACvC,CAAC;IAED;;;OAGG;IACH,IAAI,gBAAgB;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,IAAI,gBAAgB,CAAC,IAAI,CAAA;IAChE,CAAC;CACD;AAED,MAAM,OAAO,iBAEX,SAAQ,wBAAgE;CAEzE;AACD,MAAM,OAAO,iBAEX,SAAQ,wBAA2D;CAEpE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { APIGuildTextChannel, ChannelType } from "discord-api-types/v10";
|
|
2
2
|
import { BaseGuildTextChannel } from "../abstracts/BaseGuildTextChannel.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import type { IfPartial } from "../utils.js";
|
|
4
|
+
export declare class GuildTextChannel<IsPartial extends boolean = false> extends BaseGuildTextChannel<ChannelType.GuildText, IsPartial> {
|
|
5
|
+
rawData: APIGuildTextChannel<ChannelType.GuildText> | null;
|
|
5
6
|
/**
|
|
6
7
|
* The default auto archive duration of threads in the channel.
|
|
7
8
|
*/
|
|
8
|
-
defaultAutoArchiveDuration
|
|
9
|
+
get defaultAutoArchiveDuration(): IfPartial<IsPartial, number | null>;
|
|
9
10
|
/**
|
|
10
11
|
* The default thread rate limit per user of the channel.
|
|
11
12
|
*/
|
|
12
|
-
defaultThreadRateLimitPerUser
|
|
13
|
-
protected setMoreSpecificData(data: APIGuildTextChannel<ChannelType.GuildText>): void;
|
|
13
|
+
get defaultThreadRateLimitPerUser(): IfPartial<IsPartial, number | null>;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=GuildTextChannel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildTextChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildTextChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GuildTextChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildTextChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,gBAAgB,CAC5B,SAAS,SAAS,OAAO,GAAG,KAAK,CAChC,SAAQ,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,SAAS,CAAC;IACvD,OAAO,EAAE,mBAAmB,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;IAElE;;OAEG;IACH,IAAI,0BAA0B,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAGpE;IAED;;OAEG;IACH,IAAI,6BAA6B,IAAI,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,CAGvE;CACD"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { ChannelType } from "discord-api-types/v10";
|
|
2
1
|
import { BaseGuildTextChannel } from "../abstracts/BaseGuildTextChannel.js";
|
|
3
2
|
export class GuildTextChannel extends BaseGuildTextChannel {
|
|
4
|
-
type = ChannelType.GuildText;
|
|
5
3
|
/**
|
|
6
4
|
* The default auto archive duration of threads in the channel.
|
|
7
5
|
*/
|
|
8
|
-
defaultAutoArchiveDuration
|
|
6
|
+
get defaultAutoArchiveDuration() {
|
|
7
|
+
if (!this.rawData)
|
|
8
|
+
return undefined;
|
|
9
|
+
return this.rawData.default_auto_archive_duration ?? null;
|
|
10
|
+
}
|
|
9
11
|
/**
|
|
10
12
|
* The default thread rate limit per user of the channel.
|
|
11
13
|
*/
|
|
12
|
-
defaultThreadRateLimitPerUser
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.
|
|
14
|
+
get defaultThreadRateLimitPerUser() {
|
|
15
|
+
if (!this.rawData)
|
|
16
|
+
return undefined;
|
|
17
|
+
return this.rawData.default_thread_rate_limit_per_user ?? null;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=GuildTextChannel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildTextChannel.js","sourceRoot":"","sources":["../../../src/structures/GuildTextChannel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GuildTextChannel.js","sourceRoot":"","sources":["../../../src/structures/GuildTextChannel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAG3E,MAAM,OAAO,gBAEX,SAAQ,oBAAsD;IAG/D;;OAEG;IACH,IAAI,0BAA0B;QAC7B,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,6BAA6B,IAAI,IAAI,CAAA;IAC1D,CAAC;IAED;;OAEG;IACH,IAAI,6BAA6B;QAChC,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,kCAAkC,IAAI,IAAI,CAAA;IAC/D,CAAC;CACD"}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { type APIThreadChannel, type ThreadChannelType } from "discord-api-types/v10";
|
|
2
2
|
import { BaseGuildChannel } from "../abstracts/BaseGuildChannel.js";
|
|
3
|
-
|
|
3
|
+
import type { IfPartial } from "../utils.js";
|
|
4
|
+
export declare class GuildThreadChannel<Type extends ThreadChannelType, IsPartial extends boolean = false> extends BaseGuildChannel<Type, IsPartial> {
|
|
5
|
+
rawData: APIThreadChannel | null;
|
|
4
6
|
/**
|
|
5
7
|
* Whether the thread is archived.
|
|
6
8
|
*/
|
|
7
|
-
archived
|
|
9
|
+
get archived(): IfPartial<IsPartial, boolean | undefined>;
|
|
8
10
|
/**
|
|
9
11
|
* The duration until the thread is auto archived.
|
|
10
12
|
*/
|
|
11
|
-
autoArchiveDuration
|
|
13
|
+
get autoArchiveDuration(): IfPartial<IsPartial, number | undefined>;
|
|
12
14
|
/**
|
|
13
15
|
* The timestamp of when the thread was archived.
|
|
14
16
|
*/
|
|
15
|
-
archiveTimestamp
|
|
17
|
+
get archiveTimestamp(): IfPartial<IsPartial, string | undefined>;
|
|
16
18
|
/**
|
|
17
19
|
* Whether the thread is locked.
|
|
18
20
|
*/
|
|
19
|
-
locked
|
|
21
|
+
get locked(): IfPartial<IsPartial, boolean | undefined>;
|
|
20
22
|
/**
|
|
21
23
|
* Whether non-moderators can add other non-moderators to a thread; only available on private threads
|
|
22
24
|
*/
|
|
23
|
-
invitable
|
|
25
|
+
get invitable(): IfPartial<IsPartial, boolean | undefined>;
|
|
24
26
|
/**
|
|
25
27
|
* The timestamp of when the thread was created.
|
|
26
28
|
*/
|
|
27
|
-
createTimestamp
|
|
29
|
+
get createTimestamp(): IfPartial<IsPartial, string | undefined>;
|
|
28
30
|
/**
|
|
29
31
|
* The number of messages in the thread.
|
|
30
32
|
*/
|
|
31
|
-
messageCount
|
|
33
|
+
get messageCount(): IfPartial<IsPartial, number | undefined>;
|
|
32
34
|
/**
|
|
33
35
|
* The number of members in the thread.
|
|
34
36
|
*
|
|
35
37
|
* @remarks
|
|
36
38
|
* This is only accurate until 50, after that, Discord stops counting.
|
|
37
39
|
*/
|
|
38
|
-
memberCount
|
|
40
|
+
get memberCount(): IfPartial<IsPartial, number | undefined>;
|
|
39
41
|
/**
|
|
40
42
|
* The ID of the owner of the thread.
|
|
41
43
|
*/
|
|
42
|
-
ownerId
|
|
44
|
+
get ownerId(): IfPartial<IsPartial, string | undefined>;
|
|
43
45
|
/**
|
|
44
46
|
* The number of messages sent in the thread.
|
|
45
47
|
*/
|
|
46
|
-
totalMessageSent
|
|
48
|
+
get totalMessageSent(): IfPartial<IsPartial, number | undefined>;
|
|
47
49
|
/**
|
|
48
50
|
* The tags applied to the thread.
|
|
49
51
|
*/
|
|
50
|
-
appliedTags
|
|
51
|
-
protected setSpecificData(data: APIThreadChannel): void;
|
|
52
|
+
get appliedTags(): IfPartial<IsPartial, string[]>;
|
|
52
53
|
/**
|
|
53
54
|
* Join the thread
|
|
54
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildThreadChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildThreadChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"GuildThreadChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GuildThreadChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,kBAAkB,CAC9B,IAAI,SAAS,iBAAiB,EAC9B,SAAS,SAAS,OAAO,GAAG,KAAK,CAChC,SAAQ,gBAAgB,CAAC,IAAI,EAAE,SAAS,CA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