| @@ -1,4 +1,4 @@ | |||||
| using System; | |||||
| using System; | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Diagnostics; | using System.Diagnostics; | ||||
| @@ -13,6 +13,8 @@ namespace Discord | |||||
| public static readonly ChannelPermissions Text = new ChannelPermissions(0b01100_0000000_1111111110001_010001); | public static readonly ChannelPermissions Text = new ChannelPermissions(0b01100_0000000_1111111110001_010001); | ||||
| /// <summary> Gets a ChannelPermissions that grants all permissions for voice channels. </summary> | /// <summary> Gets a ChannelPermissions that grants all permissions for voice channels. </summary> | ||||
| public static readonly ChannelPermissions Voice = new ChannelPermissions(0b00100_1111110_0000000000000_010001); | public static readonly ChannelPermissions Voice = new ChannelPermissions(0b00100_1111110_0000000000000_010001); | ||||
| /// <summary> Gets a ChannelPermissions that grants all permissions for category channels. </summary> | |||||
| public static readonly ChannelPermissions Category = new ChannelPermissions(0b01100_1111110_1111111110001_010001); | |||||
| /// <summary> Gets a ChannelPermissions that grants all permissions for direct message channels. </summary> | /// <summary> Gets a ChannelPermissions that grants all permissions for direct message channels. </summary> | ||||
| public static readonly ChannelPermissions DM = new ChannelPermissions(0b00000_1000110_1011100110000_000000); | public static readonly ChannelPermissions DM = new ChannelPermissions(0b00000_1000110_1011100110000_000000); | ||||
| /// <summary> Gets a ChannelPermissions that grants all permissions for group channels. </summary> | /// <summary> Gets a ChannelPermissions that grants all permissions for group channels. </summary> | ||||
| @@ -24,6 +26,7 @@ namespace Discord | |||||
| { | { | ||||
| case ITextChannel _: return Text; | case ITextChannel _: return Text; | ||||
| case IVoiceChannel _: return Voice; | case IVoiceChannel _: return Voice; | ||||
| case ICategoryChannel _: return Category; | |||||
| case IDMChannel _: return DM; | case IDMChannel _: return DM; | ||||
| case IGroupChannel _: return Group; | case IGroupChannel _: return Group; | ||||
| default: throw new ArgumentException("Unknown channel type", nameof(channel)); | default: throw new ArgumentException("Unknown channel type", nameof(channel)); | ||||
| @@ -157,4 +160,4 @@ namespace Discord | |||||
| public override string ToString() => RawValue.ToString(); | public override string ToString() => RawValue.ToString(); | ||||
| private string DebuggerDisplay => $"{string.Join(", ", ToList())}"; | private string DebuggerDisplay => $"{string.Join(", ", ToList())}"; | ||||
| } | } | ||||
| } | |||||
| } | |||||