[Feature] Age restricted (NSFW) application commands support (#2531)
* add `nsfw` to data model & internal methods; add missing property * add `nsfw` prop to command builders * add `NsfwCommandAttribute` to Interaction Framework * working state * docs?
This commit is contained in:
@@ -39,6 +39,9 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc/>
|
||||
public bool IsEnabledInDm { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsNsfw { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GuildPermissions DefaultMemberPermissions { get; private set; }
|
||||
|
||||
@@ -130,6 +133,7 @@ namespace Discord.WebSocket
|
||||
|
||||
IsEnabledInDm = model.DmPermission.GetValueOrDefault(true).GetValueOrDefault(true);
|
||||
DefaultMemberPermissions = new GuildPermissions((ulong)model.DefaultMemberPermission.GetValueOrDefault(0).GetValueOrDefault(0));
|
||||
IsNsfw = model.Nsfw.GetValueOrDefault(false).GetValueOrDefault(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in New Issue
Block a user