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 System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
@@ -40,6 +41,7 @@ namespace Discord.WebSocket
|
||||
|
||||
//IChannel
|
||||
string IChannel.Name => null;
|
||||
bool IChannel.IsNsfw => ChannelHelper.IsNsfw(this);
|
||||
|
||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
|
||||
=> Task.FromResult<IUser>(null); //Overridden
|
||||
|
||||
Reference in New Issue
Block a user