@@ -18,17 +18,17 @@ public struct ChannelPermissions
1818 /// <summary>
1919 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for text channels.
2020 /// </summary>
21- public static readonly ChannelPermissions Text = new ( 0b110_110001_001111_110010_110011_111101_111111_111101_010001 ) ;
21+ public static readonly ChannelPermissions Text = new ( 0b1110_110001_001111_110010_110011_111101_111111_111101_010001 ) ;
2222
2323 /// <summary>
2424 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for voice channels.
2525 /// </summary>
26- public static readonly ChannelPermissions Voice = new ( 0b111_110101_001010_001010_110011_111101_111111_111101_010001 ) ;
26+ public static readonly ChannelPermissions Voice = new ( 0b0111_110101_001010_001010_110011_111101_111111_111101_010001 ) ;
2727
2828 /// <summary>
2929 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for stage channels.
3030 /// </summary>
31- public static readonly ChannelPermissions Stage = new ( 0b110_110100_000010_001110_010001_010101_111111_111001_010001 ) ;
31+ public static readonly ChannelPermissions Stage = new ( 0b0110_110100_000010_001110_010001_010101_111111_111001_010001 ) ;
3232
3333 /// <summary>
3434 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for category channels.
@@ -48,7 +48,7 @@ public struct ChannelPermissions
4848 /// <summary>
4949 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for forum channels.
5050 /// </summary>
51- public static readonly ChannelPermissions Forum = new ( 0b000001_001110_010010_110011_111101_111111_111101_010001 ) ;
51+ public static readonly ChannelPermissions Forum = new ( 0b1000_000001_001110_010010_110011_111101_111111_111101_010001 ) ;
5252
5353 /// <summary>
5454 /// Gets a <see cref="ChannelPermissions"/> that grants all permissions for media channels.
@@ -158,6 +158,8 @@ public static ChannelPermissions All(IChannel channel)
158158 public bool UserExternalApps => Permissions . GetValue ( RawValue , ChannelPermission . UseExternalApps ) ;
159159 /// <summary> If <see langword="true"/>, a user-installed application can send public responses.</summary>
160160 public bool UseExternalSounds => Permissions . GetValue ( RawValue , ChannelPermission . UseExternalSounds ) ;
161+ /// <summary> If <see langword="true"/>, a user can ping and unpin messages.</summary>
162+ public bool PinMessages => Permissions . GetValue ( RawValue , ChannelPermission . PinMessages ) ;
161163
162164 /// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value.</summary>
163165 public ChannelPermissions ( ulong rawValue ) { RawValue = rawValue ; }
@@ -200,7 +202,8 @@ private ChannelPermissions(ulong initialValue,
200202 bool ? setVoiceChannelStatus = null ,
201203 bool ? sendPolls = null ,
202204 bool ? useExternalApps = null ,
203- bool ? useExternalSounds = null )
205+ bool ? useExternalSounds = null ,
206+ bool ? pinMessages = null )
204207 {
205208 ulong value = initialValue ;
206209
@@ -242,6 +245,7 @@ private ChannelPermissions(ulong initialValue,
242245 Permissions . SetValue ( ref value , sendPolls , ChannelPermission . SendPolls ) ;
243246 Permissions . SetValue ( ref value , useExternalApps , ChannelPermission . UseExternalApps ) ;
244247 Permissions . SetValue ( ref value , useExternalSounds , ChannelPermission . UseExternalSounds ) ;
248+ Permissions . SetValue ( ref value , pinMessages , ChannelPermission . PinMessages ) ;
245249
246250 RawValue = value ;
247251 }
@@ -285,12 +289,14 @@ public ChannelPermissions(
285289 bool setVoiceChannelStatus = false ,
286290 bool sendPolls = false ,
287291 bool useExternalApps = false ,
288- bool useExternalSounds = false )
292+ bool useExternalSounds = false ,
293+ bool pinMessages = false )
289294 : this ( 0 , createInstantInvite , manageChannel , addReactions , viewChannel , sendMessages , sendTTSMessages , manageMessages ,
290295 embedLinks , attachFiles , readMessageHistory , mentionEveryone , useExternalEmojis , connect ,
291296 speak , muteMembers , deafenMembers , moveMembers , useVoiceActivation , prioritySpeaker , stream , manageRoles , manageWebhooks ,
292297 useApplicationCommands , requestToSpeak , manageThreads , createPublicThreads , createPrivateThreads , useExternalStickers , sendMessagesInThreads ,
293- startEmbeddedActivities , useSoundboard , createEvents , sendVoiceMessages , useClydeAI , setVoiceChannelStatus , sendPolls , useExternalApps , useExternalSounds )
298+ startEmbeddedActivities , useSoundboard , createEvents , sendVoiceMessages , useClydeAI , setVoiceChannelStatus , sendPolls , useExternalApps ,
299+ useExternalSounds , pinMessages )
294300 { }
295301
296302 /// <summary> Creates a new <see cref="ChannelPermissions"/> from this one, changing the provided non-null permissions.</summary>
@@ -332,7 +338,8 @@ public ChannelPermissions Modify(
332338 bool ? setVoiceChannelStatus = null ,
333339 bool ? sendPolls = null ,
334340 bool ? useExternalApps = null ,
335- bool ? useExternalSounds = null )
341+ bool ? useExternalSounds = null ,
342+ bool ? pinMessages = null )
336343 => new ChannelPermissions ( RawValue ,
337344 createInstantInvite ,
338345 manageChannel ,
@@ -371,7 +378,8 @@ public ChannelPermissions Modify(
371378 setVoiceChannelStatus ,
372379 sendPolls ,
373380 useExternalApps ,
374- useExternalSounds ) ;
381+ useExternalSounds ,
382+ pinMessages ) ;
375383
376384 public bool Has ( ChannelPermission permission ) => Permissions . GetValue ( RawValue , permission ) ;
377385
0 commit comments