1717use JaxkDev \DiscordBot \Models \Emoji ;
1818use JaxkDev \DiscordBot \Models \Sticker ;
1919use JaxkDev \DiscordBot \Plugin \Utils ;
20- use function in_array ;
2120
2221/**
2322 * @implements BinarySerializable<Guild>
@@ -40,40 +39,6 @@ final class Guild implements BinarySerializable{
4039 "SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES " => (1 << 5 )
4140 ];
4241
43- /**
44- * @link https://discord.com/developers/docs/resources/guild#guild-object-guild-features
45- * @var string[]
46- */
47- public const FEATURES = [
48- "ANIMATED_BANNER " ,
49- "ANIMATED_ICON " ,
50- "APPLICATION_COMMAND_PERMISSIONS_V2 " ,
51- "AUTO_MODERATION " ,
52- "BANNER " ,
53- "COMMUNITY " ,
54- "CREATOR_MONETIZABLE_PROVISIONAL " ,
55- "CREATOR_STORE_PAGE " ,
56- "DEVELOPER_SUPPORT_SERVER " ,
57- "DISCOVERABLE " ,
58- "FEATURABLE " ,
59- "INVITES_DISABLED " ,
60- "INVITE_SPLASH " ,
61- "MEMBER_VERIFICATION_GATE_ENABLED " ,
62- "MORE_STICKERS " ,
63- "NEWS " ,
64- "PARTNERED " ,
65- "PREVIEW_ENABLED " ,
66- "RAID_ALERTS_DISABLED " ,
67- "ROLE_ICONS " ,
68- "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE " ,
69- "ROLE_SUBSCRIPTIONS_ENABLED " ,
70- "TICKETED_EVENTS_ENABLED " ,
71- "VANITY_URL " ,
72- "VERIFIED " ,
73- "VIP_REGIONS " ,
74- "WELCOME_SCREEN_ENABLED "
75- ];
76-
7742 /** Guild id */
7843 private string $ id ;
7944
@@ -120,7 +85,7 @@ final class Guild implements BinarySerializable{
12085 private array $ emojis ;
12186
12287 /**
123- * @link https://discord.com/developers/docs/resources/guild#guild-object-guild-features
88+ * @link https://discord.com/developers/docs/resources/guild#guild-object-guild-features - NOTE, Does not contain all features.
12489 * @var string[]
12590 */
12691 private array $ features ;
@@ -176,7 +141,7 @@ final class Guild implements BinarySerializable{
176141 /** The NSFW level of the guild */
177142 private NsfwLevel $ nsfw_level ;
178143
179- /*
144+ /**
180145 * Custom guild stickers
181146 * @var Sticker[]
182147 */
@@ -395,11 +360,6 @@ public function getFeatures(): array{
395360
396361 /** @param string[] $features */
397362 public function setFeatures (array $ features ): void {
398- foreach ($ features as $ feature ){
399- if (!in_array ($ feature , self ::FEATURES , true )){
400- throw new \AssertionError ("Feature ' $ feature' is invalid. " );
401- }
402- }
403363 $ this ->features = $ features ;
404364 }
405365
0 commit comments