@discordjs/structures 0.2.0-dev.1769558523-b0e413c11 → 0.2.0-dev.1770422605-c460a920a
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/dist/index.d.mts +132 -8
- package/dist/index.d.ts +132 -8
- package/dist/index.js +180 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +173 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -137,7 +137,9 @@ var AutoModerationAction = class extends Structure {
|
|
|
137
137
|
super(data);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
|
-
* The
|
|
140
|
+
* The action type
|
|
141
|
+
*
|
|
142
|
+
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
|
|
141
143
|
*/
|
|
142
144
|
get type() {
|
|
143
145
|
return this[kData].type;
|
|
@@ -229,13 +231,17 @@ var AutoModerationRule = class extends Structure {
|
|
|
229
231
|
return this[kData].creator_id;
|
|
230
232
|
}
|
|
231
233
|
/**
|
|
232
|
-
* The rule
|
|
234
|
+
* The rule event type
|
|
235
|
+
*
|
|
236
|
+
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
|
|
233
237
|
*/
|
|
234
238
|
get eventType() {
|
|
235
239
|
return this[kData].event_type;
|
|
236
240
|
}
|
|
237
241
|
/**
|
|
238
|
-
* The rule
|
|
242
|
+
* The rule trigger type
|
|
243
|
+
*
|
|
244
|
+
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
|
|
239
245
|
*/
|
|
240
246
|
get triggerType() {
|
|
241
247
|
return this[kData].trigger_type;
|
|
@@ -606,6 +612,21 @@ var PermissionsBitField = class extends BitField {
|
|
|
606
612
|
}
|
|
607
613
|
};
|
|
608
614
|
|
|
615
|
+
// src/bitfields/SKUFlagsBitField.ts
|
|
616
|
+
import { SKUFlags } from "discord-api-types/v10";
|
|
617
|
+
var SKUFlagsBitField = class extends BitField {
|
|
618
|
+
static {
|
|
619
|
+
__name(this, "SKUFlagsBitField");
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Numeric SKU flags.
|
|
623
|
+
*/
|
|
624
|
+
static Flags = SKUFlags;
|
|
625
|
+
toJSON() {
|
|
626
|
+
return super.toJSON(true);
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
|
|
609
630
|
// src/channels/mixins/AppliedTagsMixin.ts
|
|
610
631
|
var AppliedTagsMixin = class {
|
|
611
632
|
static {
|
|
@@ -3956,6 +3977,61 @@ var PollResults = class extends Structure {
|
|
|
3956
3977
|
}
|
|
3957
3978
|
};
|
|
3958
3979
|
|
|
3980
|
+
// src/skus/SKU.ts
|
|
3981
|
+
var SKU = class extends Structure {
|
|
3982
|
+
static {
|
|
3983
|
+
__name(this, "SKU");
|
|
3984
|
+
}
|
|
3985
|
+
/**
|
|
3986
|
+
* The template used for removing data from the raw data stored for each SKU
|
|
3987
|
+
*/
|
|
3988
|
+
static DataTemplate = {};
|
|
3989
|
+
/**
|
|
3990
|
+
* @param data - The raw data received from the API for the SKU
|
|
3991
|
+
*/
|
|
3992
|
+
constructor(data) {
|
|
3993
|
+
super(data);
|
|
3994
|
+
}
|
|
3995
|
+
/**
|
|
3996
|
+
* Id of the SKU
|
|
3997
|
+
*/
|
|
3998
|
+
get id() {
|
|
3999
|
+
return this[kData].id;
|
|
4000
|
+
}
|
|
4001
|
+
/**
|
|
4002
|
+
* Type of SKU
|
|
4003
|
+
*
|
|
4004
|
+
* @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
|
|
4005
|
+
*/
|
|
4006
|
+
get type() {
|
|
4007
|
+
return this[kData].type;
|
|
4008
|
+
}
|
|
4009
|
+
/**
|
|
4010
|
+
* Id of the parent application
|
|
4011
|
+
*/
|
|
4012
|
+
get applicationId() {
|
|
4013
|
+
return this[kData].application_id;
|
|
4014
|
+
}
|
|
4015
|
+
/**
|
|
4016
|
+
* Customer-facing name of your premium offering
|
|
4017
|
+
*/
|
|
4018
|
+
get name() {
|
|
4019
|
+
return this[kData].name;
|
|
4020
|
+
}
|
|
4021
|
+
/**
|
|
4022
|
+
* System-generated URL slug based on the SKU's name
|
|
4023
|
+
*/
|
|
4024
|
+
get slug() {
|
|
4025
|
+
return this[kData].slug;
|
|
4026
|
+
}
|
|
4027
|
+
/**
|
|
4028
|
+
* SKU flags combined as a bitfield
|
|
4029
|
+
*/
|
|
4030
|
+
get flags() {
|
|
4031
|
+
return isFieldSet(this[kData], "flags", "number") ? new SKUFlagsBitField(this[kData].flags) : null;
|
|
4032
|
+
}
|
|
4033
|
+
};
|
|
4034
|
+
|
|
3959
4035
|
// src/soundboards/SoundboardSound.ts
|
|
3960
4036
|
import { DiscordSnowflake as DiscordSnowflake5 } from "@sapphire/snowflake";
|
|
3961
4037
|
var SoundboardSound = class extends Structure {
|
|
@@ -4581,6 +4657,95 @@ var Connection = class extends Structure {
|
|
|
4581
4657
|
}
|
|
4582
4658
|
};
|
|
4583
4659
|
|
|
4660
|
+
// src/webhooks/Webhook.ts
|
|
4661
|
+
import { DiscordSnowflake as DiscordSnowflake11 } from "@sapphire/snowflake";
|
|
4662
|
+
var Webhook = class extends Structure {
|
|
4663
|
+
static {
|
|
4664
|
+
__name(this, "Webhook");
|
|
4665
|
+
}
|
|
4666
|
+
/**
|
|
4667
|
+
* The template used for removing data from the raw data stored for each webhook
|
|
4668
|
+
*/
|
|
4669
|
+
static DataTemplate = {};
|
|
4670
|
+
/**
|
|
4671
|
+
* @param data - The raw data received from the API for the webhook
|
|
4672
|
+
*/
|
|
4673
|
+
constructor(data) {
|
|
4674
|
+
super(data);
|
|
4675
|
+
}
|
|
4676
|
+
/**
|
|
4677
|
+
* The id of the webhook
|
|
4678
|
+
*/
|
|
4679
|
+
get id() {
|
|
4680
|
+
return this[kData].id;
|
|
4681
|
+
}
|
|
4682
|
+
/**
|
|
4683
|
+
* The type of the webhook
|
|
4684
|
+
*
|
|
4685
|
+
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
|
|
4686
|
+
*/
|
|
4687
|
+
get type() {
|
|
4688
|
+
return this[kData].type;
|
|
4689
|
+
}
|
|
4690
|
+
/**
|
|
4691
|
+
* The guild id this webhook is for, if any
|
|
4692
|
+
*/
|
|
4693
|
+
get guildId() {
|
|
4694
|
+
return this[kData].guild_id;
|
|
4695
|
+
}
|
|
4696
|
+
/**
|
|
4697
|
+
* The channel id this webhook is for, if any
|
|
4698
|
+
*/
|
|
4699
|
+
get channelId() {
|
|
4700
|
+
return this[kData].channel_id;
|
|
4701
|
+
}
|
|
4702
|
+
/**
|
|
4703
|
+
* The default name of the webhook
|
|
4704
|
+
*/
|
|
4705
|
+
get name() {
|
|
4706
|
+
return this[kData].name;
|
|
4707
|
+
}
|
|
4708
|
+
/**
|
|
4709
|
+
* The default user avatar hash of the webhook
|
|
4710
|
+
*
|
|
4711
|
+
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
|
4712
|
+
*/
|
|
4713
|
+
get avatar() {
|
|
4714
|
+
return this[kData].avatar;
|
|
4715
|
+
}
|
|
4716
|
+
/**
|
|
4717
|
+
* The secure token of the webhook (returned for incoming webhooks)
|
|
4718
|
+
*/
|
|
4719
|
+
get token() {
|
|
4720
|
+
return this[kData].token;
|
|
4721
|
+
}
|
|
4722
|
+
/**
|
|
4723
|
+
* The id of the bot/OAuth2 application that created this webhook
|
|
4724
|
+
*/
|
|
4725
|
+
get applicationId() {
|
|
4726
|
+
return this[kData].application_id;
|
|
4727
|
+
}
|
|
4728
|
+
/**
|
|
4729
|
+
* The url used for executing the webhook (returned by the webhooks OAuth2 flow)
|
|
4730
|
+
*/
|
|
4731
|
+
get url() {
|
|
4732
|
+
return this[kData].url;
|
|
4733
|
+
}
|
|
4734
|
+
/**
|
|
4735
|
+
* The timestamp the webhook was created at
|
|
4736
|
+
*/
|
|
4737
|
+
get createdTimestamp() {
|
|
4738
|
+
return isIdSet(this.id) ? DiscordSnowflake11.timestampFrom(this.id) : null;
|
|
4739
|
+
}
|
|
4740
|
+
/**
|
|
4741
|
+
* The time the webhook was created at
|
|
4742
|
+
*/
|
|
4743
|
+
get createdAt() {
|
|
4744
|
+
const createdTimestamp = this.createdTimestamp;
|
|
4745
|
+
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4746
|
+
}
|
|
4747
|
+
};
|
|
4748
|
+
|
|
4584
4749
|
// src/voice/VoiceState.ts
|
|
4585
4750
|
var VoiceState = class extends Structure {
|
|
4586
4751
|
static {
|
|
@@ -4718,7 +4883,7 @@ var VoiceRegion = class extends Structure {
|
|
|
4718
4883
|
};
|
|
4719
4884
|
|
|
4720
4885
|
// src/subscriptions/Subscription.ts
|
|
4721
|
-
import { DiscordSnowflake as
|
|
4886
|
+
import { DiscordSnowflake as DiscordSnowflake12 } from "@sapphire/snowflake";
|
|
4722
4887
|
var Subscription = class extends Structure {
|
|
4723
4888
|
static {
|
|
4724
4889
|
__name(this, "Subscription");
|
|
@@ -4850,7 +5015,7 @@ var Subscription = class extends Structure {
|
|
|
4850
5015
|
* The timestamp the subscription was created at
|
|
4851
5016
|
*/
|
|
4852
5017
|
get createdTimestamp() {
|
|
4853
|
-
return isIdSet(this.id) ?
|
|
5018
|
+
return isIdSet(this.id) ? DiscordSnowflake12.timestampFrom(this.id) : null;
|
|
4854
5019
|
}
|
|
4855
5020
|
/**
|
|
4856
5021
|
* The time the subscription was created at
|
|
@@ -4944,6 +5109,8 @@ export {
|
|
|
4944
5109
|
ResolvedInteractionData,
|
|
4945
5110
|
RoleSelectMenuComponent,
|
|
4946
5111
|
RoleSubscriptionData,
|
|
5112
|
+
SKU,
|
|
5113
|
+
SKUFlagsBitField,
|
|
4947
5114
|
SectionComponent,
|
|
4948
5115
|
SelectMenuComponent,
|
|
4949
5116
|
SelectMenuDefaultValue,
|
|
@@ -4974,6 +5141,7 @@ export {
|
|
|
4974
5141
|
VoiceChannelMixin,
|
|
4975
5142
|
VoiceRegion,
|
|
4976
5143
|
VoiceState,
|
|
5144
|
+
Webhook,
|
|
4977
5145
|
dateToDiscordISOTimestamp,
|
|
4978
5146
|
extendTemplate
|
|
4979
5147
|
};
|