Browse Source

feature: Add GetCategory method (#1261)

tags/2.1.0
Still Hsu Christopher F 6 years ago
parent
commit
e03c5274f8
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs

+ 9
- 0
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -520,6 +520,15 @@ namespace Discord.WebSocket
/// </returns>
public SocketVoiceChannel GetVoiceChannel(ulong id)
=> GetChannel(id) as SocketVoiceChannel;
/// <summary>
/// Gets a category channel in this guild.
/// </summary>
/// <param name="id">The snowflake identifier for the category channel.</param>
/// <returns>
/// A category channel associated with the specified <paramref name="id" />; <c>null</c> if none is found.
/// </returns>
public SocketCategoryChannel GetCategoryChannel(ulong id)
=> GetChannel(id) as SocketCategoryChannel;

/// <summary>
/// Creates a new text channel in this guild.


Loading…
Cancel
Save