From e03c5274f8c4ea2d3f1a0be7aafe8db6004386ac Mon Sep 17 00:00:00 2001
From: Still Hsu <341464@gmail.com>
Date: Sun, 5 May 2019 05:07:56 +0800
Subject: [PATCH] feature: Add GetCategory method (#1261)
---
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
index ca2db1a77..955e219af 100644
--- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
+++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
@@ -520,6 +520,15 @@ namespace Discord.WebSocket
///
public SocketVoiceChannel GetVoiceChannel(ulong id)
=> GetChannel(id) as SocketVoiceChannel;
+ ///
+ /// Gets a category channel in this guild.
+ ///
+ /// The snowflake identifier for the category channel.
+ ///
+ /// A category channel associated with the specified ; null if none is found.
+ ///
+ public SocketCategoryChannel GetCategoryChannel(ulong id)
+ => GetChannel(id) as SocketCategoryChannel;
///
/// Creates a new text channel in this guild.