Browse Source

Add GetCategory method

pull/1261/head
Still Hsu 6 years ago
parent
commit
6b034af1d0
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
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