Add IChannel.Nsfw, RequireNsfw precondition (#633)
* Add IChannel.Nsfw, RequireNsfw precondition * Refactored IChannel.Nsfw to IsNsfw, removed NsfwUtils Per pull-request feedback * proper nsfw channel check
This commit is contained in:
committed by
RogueException
parent
05f8f41567
commit
7f1fc286cf
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Discord.Rest;
|
||||
using System;
|
||||
|
||||
using Model = Discord.API.Rpc.Channel;
|
||||
|
||||
@@ -7,6 +8,7 @@ namespace Discord.Rpc
|
||||
public class RpcChannel : RpcEntity<ulong>
|
||||
{
|
||||
public string Name { get; private set; }
|
||||
public bool IsNsfw => ChannelHelper.IsNsfw(Name);
|
||||
|
||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user