[Features] Automod member profile moderation, new application fields, use clyde ai & guild invenory settings (#2791)
* guild inventory settings * `UseClydeAI` (1L << 47) permission * automod member profile moderation * Dnet: The Enums update (new application fields) * ah yeah, `IApplication` * some oversights * y did I change this * oh bruh nvm * `CreateGuildExpressions` permission --------- Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationDiscoverabilityState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application has no discoverability state.
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is ineligible for the application directory.
|
||||||
|
/// </summary>
|
||||||
|
Ineligible = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is not listed in the application directory.
|
||||||
|
/// </summary>
|
||||||
|
NotDiscoverable = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is listed in the application directory.
|
||||||
|
/// </summary>
|
||||||
|
Discoverable = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is featureable in the application directory.
|
||||||
|
/// </summary>
|
||||||
|
Featureable = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been blocked from appearing in the application directory.
|
||||||
|
/// </summary>
|
||||||
|
Blocked = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationExplicitContentFilterLevel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Media content will not be filtered.
|
||||||
|
/// </summary>
|
||||||
|
Disabled = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Media content will be filtered.
|
||||||
|
/// </summary>
|
||||||
|
Enabled = 1,
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationInteractionsVersion
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Only Interaction Create events are sent as documented (default).
|
||||||
|
/// </summary>
|
||||||
|
Version1 = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A selection of chosen events are sent.
|
||||||
|
/// </summary>
|
||||||
|
Version2 = 2,
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the monetization eligibility flags for the application combined as a bitfield.
|
||||||
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
|
public enum ApplicationMonetizationEligibilityFlags
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The application has no monetization eligibility flags set.
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is verified.
|
||||||
|
/// </summary>
|
||||||
|
Verified = 1 << 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is owned by a team.
|
||||||
|
/// </summary>
|
||||||
|
HasTeam = 1 << 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has the message content intent approved or uses application commands.
|
||||||
|
/// </summary>
|
||||||
|
ApprovedCommands = 1 << 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has terms of service set.
|
||||||
|
/// </summary>
|
||||||
|
TermsOfService = 1 << 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a privacy policy set.
|
||||||
|
/// </summary>
|
||||||
|
PrivacyPolicy = 1 << 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's name is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeName = 1 << 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's description is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeDescription = 1 << 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's role connections metadata is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeRoleConnections = 1 << 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is not quarantined.
|
||||||
|
/// </summary>
|
||||||
|
NotQuarantined = 1 << 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's team members all have verified emails.
|
||||||
|
/// </summary>
|
||||||
|
TeamMembersEmailVerified = 1 << 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's team members all have MFA enabled.
|
||||||
|
/// </summary>
|
||||||
|
TeamMembersMfaEnabled = 1 << 16,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has no issues blocking monetization.
|
||||||
|
/// </summary>
|
||||||
|
NoBlockingIssues = 1 << 17,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's team has a valid payout status.
|
||||||
|
/// </summary>
|
||||||
|
ValidPayoutStatus = 1 << 18,
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationMonetizationState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application has no monetization set up.
|
||||||
|
/// </summary>
|
||||||
|
None = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has monetization set up.
|
||||||
|
/// </summary>
|
||||||
|
Enabled = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been blocked from monetizing.
|
||||||
|
/// </summary>
|
||||||
|
Blocked = 3,
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationRpcState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application does not have access to RPC.
|
||||||
|
/// </summary>
|
||||||
|
Disabled = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has not yet been applied for RPC access.
|
||||||
|
/// </summary>
|
||||||
|
Unsubmitted = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has submitted a RPC access request.
|
||||||
|
/// </summary>
|
||||||
|
Submitted = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been approved for RPC access.
|
||||||
|
/// </summary>
|
||||||
|
Approved = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been rejected from RPC access.
|
||||||
|
/// </summary>
|
||||||
|
Rejected = 4,
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationStoreState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application does not have a commerce license.
|
||||||
|
/// </summary>
|
||||||
|
None = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a commerce license but has not yet submitted a store approval request.
|
||||||
|
/// </summary>
|
||||||
|
Paid = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has submitted a store approval request.
|
||||||
|
/// </summary>
|
||||||
|
Submitted = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been approved for the store.
|
||||||
|
/// </summary>
|
||||||
|
Approved = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been rejected from the store.
|
||||||
|
/// </summary>
|
||||||
|
Rejected = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public enum ApplicationVerificationState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application is ineligible for verification.
|
||||||
|
/// </summary>
|
||||||
|
Ineligible = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has not yet been applied for verification.
|
||||||
|
/// </summary>
|
||||||
|
Unsubmitted = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has submitted a verification request.
|
||||||
|
/// </summary>
|
||||||
|
Submitted = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has been verified.
|
||||||
|
/// </summary>
|
||||||
|
Succeeded = 4,
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the discovery eligibility flags for the application combined as a bitfield.
|
||||||
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
|
public enum DiscoveryEligibilityFlags
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The application has no eligibility flags.
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is verified.
|
||||||
|
/// </summary>
|
||||||
|
Verified = 1 << 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has at least one tag set.
|
||||||
|
/// </summary>
|
||||||
|
Tag = 1 << 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a description.
|
||||||
|
/// </summary>
|
||||||
|
Description = 1 << 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has terms of service set.
|
||||||
|
/// </summary>
|
||||||
|
TermsOfService = 1 << 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a privacy policy set.
|
||||||
|
/// </summary>
|
||||||
|
PrivacyPolicy = 1 << 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a custom install URL or install parameters.
|
||||||
|
/// </summary>
|
||||||
|
InstallParams = 1 << 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's name is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeName = 1 << 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's description is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeDescription = 1 << 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has the message content intent approved or uses application commands.
|
||||||
|
/// </summary>
|
||||||
|
ApprovedCommands = 1 << 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has a support guild set.
|
||||||
|
/// </summary>
|
||||||
|
SupportGuild = 1 << 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's commands are safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeCommands = 1 << 10,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's owner has MFA enabled.
|
||||||
|
/// </summary>
|
||||||
|
MfaEnabled = 1 << 11,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's directory long description is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeDirectoryOverview = 1 << 12,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application has at least one supported locale set.
|
||||||
|
/// </summary>
|
||||||
|
SupportedLocales = 1 << 13,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's directory short description is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeShortDescription = 1 << 14,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application's role connections metadata is safe for work.
|
||||||
|
/// </summary>
|
||||||
|
SafeRoleConnections = 1 << 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application is eligible for discovery.
|
||||||
|
/// </summary>
|
||||||
|
Eligible = 1 << 16,
|
||||||
|
}
|
||||||
@@ -54,45 +54,105 @@ namespace Discord
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the url of the app's terms of service.
|
/// Gets the url of the app's terms of service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TermsOfService { get; }
|
string TermsOfService { get; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the the url of the app's privacy policy.
|
/// Gets the the url of the app's privacy policy.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PrivacyPolicy { get; }
|
string PrivacyPolicy { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets application's default custom authorization url. <see langword="null" /> if disabled.
|
/// Gets application's default custom authorization url. <see langword="null" /> if disabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CustomInstallUrl { get; }
|
string CustomInstallUrl { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the application's role connection verification entry point. <see langword="null" /> if not set.
|
/// Gets the application's role connection verification entry point. <see langword="null" /> if not set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RoleConnectionsVerificationUrl { get; }
|
string RoleConnectionsVerificationUrl { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the hex encoded key for verification in interactions.
|
/// Gets the hex encoded key for verification in interactions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string VerifyKey { get; }
|
string VerifyKey { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the partial guild object of the application's developer's support server. <see langword="null" /> if not set.
|
/// Gets the partial guild object of the application's developer's support server. <see langword="null" /> if not set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PartialGuild Guild { get; }
|
PartialGuild Guild { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the redirect uris configured for the application.
|
/// Gets the redirect uris configured for the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IReadOnlyCollection<string> RedirectUris { get;}
|
IReadOnlyCollection<string> RedirectUris { get;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets application's interactions endpoint url. <see langword="null" /> if not set.
|
/// Gets application's interactions endpoint url. <see langword="null" /> if not set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string InteractionsEndpointUrl { get; }
|
string InteractionsEndpointUrl { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the approximate count of the guild the application was added to. <see langword="null" /> if not returned.
|
/// Gets the approximate count of the guild the application was added to. <see langword="null" /> if not returned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? ApproximateGuildCount { get; }
|
int? ApproximateGuildCount { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's discoverability state.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationDiscoverabilityState DiscoverabilityState { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's discovery eligibility flags.
|
||||||
|
/// </summary>
|
||||||
|
DiscoveryEligibilityFlags DiscoveryEligibilityFlags { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's explicit content filter level for uploaded media content used in application commands.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationExplicitContentFilterLevel ExplicitContentFilterLevel { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets whether the bot is allowed to hook into the application's game directly.
|
||||||
|
/// </summary>
|
||||||
|
bool IsHook { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets event types to be sent to the interaction endpoint.
|
||||||
|
/// </summary>
|
||||||
|
IReadOnlyCollection<string> InteractionEventTypes { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the interactions version application uses.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationInteractionsVersion InteractionsVersion { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the application has premium subscriptions.
|
||||||
|
/// </summary>
|
||||||
|
bool IsMonetized { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's monetization eligibility flags.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationMonetizationEligibilityFlags MonetizationEligibilityFlags { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's monetization state.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationMonetizationState MonetizationState { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's rpc state.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationRpcState RpcState { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's store state.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationStoreState StoreState { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the application's verification state.
|
||||||
|
/// </summary>
|
||||||
|
ApplicationVerificationState VerificationState { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
using System;
|
namespace Discord;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Discord
|
public enum AutoModActionType
|
||||||
{
|
{
|
||||||
public enum AutoModActionType
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Blocks the content of a message according to the rule.
|
/// Blocks the content of a message according to the rule.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -22,5 +16,9 @@ namespace Discord
|
|||||||
/// Timeout user for a specified duration.
|
/// Timeout user for a specified duration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Timeout = 3,
|
Timeout = 3,
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prevents a member from using text, voice, or other interactions.
|
||||||
|
/// </summary>
|
||||||
|
BlockMemberInteraction = 4
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
using System;
|
namespace Discord;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Discord
|
/// <summary>
|
||||||
|
/// An enum indecating in what event context a rule should be checked.
|
||||||
|
/// </summary>
|
||||||
|
public enum AutoModEventType
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// An enum indecating in what event context a rule should be checked.
|
|
||||||
/// </summary>
|
|
||||||
public enum AutoModEventType
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When a member sends or edits a message in the guild.
|
/// When a member sends or edits a message in the guild.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MessageSend = 1
|
MessageSend = 1,
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// When a member edits their profile.
|
||||||
|
/// </summary>
|
||||||
|
MemberUpdate = 2
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,5 +35,10 @@ namespace Discord
|
|||||||
/// Check if content contains more unique mentions than allowed.
|
/// Check if content contains more unique mentions than allowed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MentionSpam = 5,
|
MentionSpam = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check if member profile contains words from a user defined list of keywords.
|
||||||
|
/// </summary>
|
||||||
|
MemberProfile = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace Discord;
|
||||||
|
|
||||||
|
public struct GuildInventorySettings
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets whether everyone can collect the pack to use emojis across servers.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsEmojiPackCollectible { get; }
|
||||||
|
|
||||||
|
internal GuildInventorySettings(bool isEmojiPackCollectible)
|
||||||
|
{
|
||||||
|
IsEmojiPackCollectible = isEmojiPackCollectible;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -376,6 +376,11 @@ namespace Discord
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
ulong MaxUploadLimit { get; }
|
ulong MaxUploadLimit { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the inventory settings on the guild. <see langword="null"/> if not available in the guild.
|
||||||
|
/// </summary>
|
||||||
|
GuildInventorySettings? InventorySettings { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the incidents data for this guild.
|
/// Gets the incidents data for this guild.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -183,6 +183,11 @@ namespace Discord
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
SendVoiceMessages = 1L << 46,
|
SendVoiceMessages = 1L << 46,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allows members to interact with the Clyde AI bot.
|
||||||
|
/// </summary>
|
||||||
|
UseClydeAI = 1L << 47,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows setting voice channel status.
|
/// Allows setting voice channel status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ namespace Discord
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for text channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for text channels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ChannelPermissions Text = new(0b10001_001111_110010_110011_111101_111111_111101_010001);
|
public static readonly ChannelPermissions Text = new(0b110001_001111_110010_110011_111101_111111_111101_010001);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for voice channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for voice channels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ChannelPermissions Voice = new(0b1_010001_001010_001010_110011_111101_111111_111101_010001);
|
public static readonly ChannelPermissions Voice = new(0b1_110001_001010_001010_110011_111101_111111_111101_010001);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for stage channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for stage channels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ChannelPermissions Stage = new(0b10000_000010_001110_010001_010101_111111_111001_010001);
|
public static readonly ChannelPermissions Stage = new(0b110000_000010_001110_010001_010101_111111_111001_010001);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for category channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for category channels.
|
||||||
@@ -48,7 +48,7 @@ namespace Discord
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for forum channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for forum channels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ChannelPermissions Forum = new(0b01_001110_010010_110011_111101_111111_111101_010001);
|
public static readonly ChannelPermissions Forum = new(0b000001_001110_010010_110011_111101_111111_111101_010001);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for media channels.
|
/// Gets a <see cref="ChannelPermissions"/> that grants all permissions for media channels.
|
||||||
@@ -148,10 +148,11 @@ namespace Discord
|
|||||||
public bool CreateEvents => Permissions.GetValue(RawValue, ChannelPermission.CreateEvents);
|
public bool CreateEvents => Permissions.GetValue(RawValue, ChannelPermission.CreateEvents);
|
||||||
/// <summary> If <see langword="true"/>, a user can send voice messages in this channel.</summary>
|
/// <summary> If <see langword="true"/>, a user can send voice messages in this channel.</summary>
|
||||||
public bool SendVoiceMessages => Permissions.GetValue(RawValue, ChannelPermission.SendVoiceMessages);
|
public bool SendVoiceMessages => Permissions.GetValue(RawValue, ChannelPermission.SendVoiceMessages);
|
||||||
|
/// <summary> If <see langword="true"/>, a user can use the Clyde AI bot in this channel.</summary>
|
||||||
|
public bool UseClydeAI => Permissions.GetValue(RawValue, ChannelPermission.UseClydeAI);
|
||||||
/// <summary> If <see langword="true"/>, a user can set the status of a voice channel.</summary>
|
/// <summary> If <see langword="true"/>, a user can set the status of a voice channel.</summary>
|
||||||
public bool SetVoiceChannelStatus => Permissions.GetValue(RawValue, GuildPermission.SetVoiceChannelStatus);
|
public bool SetVoiceChannelStatus => Permissions.GetValue(RawValue, GuildPermission.SetVoiceChannelStatus);
|
||||||
|
|
||||||
|
|
||||||
/// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value.</summary>
|
/// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value.</summary>
|
||||||
public ChannelPermissions(ulong rawValue) { RawValue = rawValue; }
|
public ChannelPermissions(ulong rawValue) { RawValue = rawValue; }
|
||||||
|
|
||||||
@@ -189,6 +190,7 @@ namespace Discord
|
|||||||
bool? useSoundboard = null,
|
bool? useSoundboard = null,
|
||||||
bool? createEvents = null,
|
bool? createEvents = null,
|
||||||
bool? sendVoiceMessages = null,
|
bool? sendVoiceMessages = null,
|
||||||
|
bool? useClydeAI = null,
|
||||||
bool? setVoiceChannelStatus = null)
|
bool? setVoiceChannelStatus = null)
|
||||||
{
|
{
|
||||||
ulong value = initialValue;
|
ulong value = initialValue;
|
||||||
@@ -226,6 +228,7 @@ namespace Discord
|
|||||||
Permissions.SetValue(ref value, useSoundboard, ChannelPermission.UseSoundboard);
|
Permissions.SetValue(ref value, useSoundboard, ChannelPermission.UseSoundboard);
|
||||||
Permissions.SetValue(ref value, createEvents, ChannelPermission.CreateEvents);
|
Permissions.SetValue(ref value, createEvents, ChannelPermission.CreateEvents);
|
||||||
Permissions.SetValue(ref value, sendVoiceMessages, ChannelPermission.SendVoiceMessages);
|
Permissions.SetValue(ref value, sendVoiceMessages, ChannelPermission.SendVoiceMessages);
|
||||||
|
Permissions.SetValue(ref value, useClydeAI, ChannelPermission.UseClydeAI);
|
||||||
Permissions.SetValue(ref value, setVoiceChannelStatus, ChannelPermission.SetVoiceChannelStatus);
|
Permissions.SetValue(ref value, setVoiceChannelStatus, ChannelPermission.SetVoiceChannelStatus);
|
||||||
|
|
||||||
RawValue = value;
|
RawValue = value;
|
||||||
@@ -266,12 +269,13 @@ namespace Discord
|
|||||||
bool useSoundboard = false,
|
bool useSoundboard = false,
|
||||||
bool createEvents = false,
|
bool createEvents = false,
|
||||||
bool sendVoiceMessages = false,
|
bool sendVoiceMessages = false,
|
||||||
|
bool useClydeAI = false,
|
||||||
bool setVoiceChannelStatus = false)
|
bool setVoiceChannelStatus = false)
|
||||||
: this(0, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages,
|
: this(0, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages,
|
||||||
embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect,
|
embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect,
|
||||||
speak, muteMembers, deafenMembers, moveMembers, useVoiceActivation, prioritySpeaker, stream, manageRoles, manageWebhooks,
|
speak, muteMembers, deafenMembers, moveMembers, useVoiceActivation, prioritySpeaker, stream, manageRoles, manageWebhooks,
|
||||||
useApplicationCommands, requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, useExternalStickers, sendMessagesInThreads,
|
useApplicationCommands, requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, useExternalStickers, sendMessagesInThreads,
|
||||||
startEmbeddedActivities, useSoundboard, createEvents, sendVoiceMessages, setVoiceChannelStatus)
|
startEmbeddedActivities, useSoundboard, createEvents, sendVoiceMessages, useClydeAI, setVoiceChannelStatus)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/// <summary> Creates a new <see cref="ChannelPermissions"/> from this one, changing the provided non-null permissions.</summary>
|
/// <summary> Creates a new <see cref="ChannelPermissions"/> from this one, changing the provided non-null permissions.</summary>
|
||||||
@@ -309,6 +313,7 @@ namespace Discord
|
|||||||
bool? useSoundboard = null,
|
bool? useSoundboard = null,
|
||||||
bool? createEvents = null,
|
bool? createEvents = null,
|
||||||
bool? sendVoiceMessages = null,
|
bool? sendVoiceMessages = null,
|
||||||
|
bool? useClydeAI = null,
|
||||||
bool? setVoiceChannelStatus = null)
|
bool? setVoiceChannelStatus = null)
|
||||||
=> new ChannelPermissions(RawValue,
|
=> new ChannelPermissions(RawValue,
|
||||||
createInstantInvite,
|
createInstantInvite,
|
||||||
@@ -344,6 +349,7 @@ namespace Discord
|
|||||||
useSoundboard,
|
useSoundboard,
|
||||||
createEvents,
|
createEvents,
|
||||||
sendVoiceMessages,
|
sendVoiceMessages,
|
||||||
|
useClydeAI,
|
||||||
setVoiceChannelStatus);
|
setVoiceChannelStatus);
|
||||||
|
|
||||||
public bool Has(ChannelPermission permission) => Permissions.GetValue(RawValue, permission);
|
public bool Has(ChannelPermission permission) => Permissions.GetValue(RawValue, permission);
|
||||||
|
|||||||
@@ -263,11 +263,21 @@ namespace Discord
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
UseSoundboard = 1L << 42,
|
UseSoundboard = 1L << 42,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.
|
||||||
|
/// </summary>
|
||||||
|
CreateGuildExpressions = 1L << 43,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows sending voice messages.
|
/// Allows sending voice messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
SendVoiceMessages = 1L << 46,
|
SendVoiceMessages = 1L << 46,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allows members to interact with the Clyde AI bot.
|
||||||
|
/// </summary>
|
||||||
|
UseClydeAI = 1L << 47,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows setting voice channel status.
|
/// Allows setting voice channel status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -108,8 +108,12 @@ namespace Discord
|
|||||||
public bool UseSoundboard => Permissions.GetValue(RawValue, GuildPermission.UseSoundboard);
|
public bool UseSoundboard => Permissions.GetValue(RawValue, GuildPermission.UseSoundboard);
|
||||||
/// <summary> If <see langword="true"/>, a user can view monetization analytics in this guild.</summary>
|
/// <summary> If <see langword="true"/>, a user can view monetization analytics in this guild.</summary>
|
||||||
public bool ViewMonetizationAnalytics => Permissions.GetValue(RawValue, GuildPermission.ViewMonetizationAnalytics);
|
public bool ViewMonetizationAnalytics => Permissions.GetValue(RawValue, GuildPermission.ViewMonetizationAnalytics);
|
||||||
/// <summary> If <see langword="true"/>, a user can send voice messages in this channel.</summary>
|
/// <summary> If <see langword="true"/>, a user can send voice messages in this guild.</summary>
|
||||||
public bool SendVoiceMessages => Permissions.GetValue(RawValue, GuildPermission.SendVoiceMessages);
|
public bool SendVoiceMessages => Permissions.GetValue(RawValue, GuildPermission.SendVoiceMessages);
|
||||||
|
/// <summary> If <see langword="true"/>, a user can use the Clyde AI bot in this guild.</summary>
|
||||||
|
public bool UseClydeAI => Permissions.GetValue(RawValue, GuildPermission.UseClydeAI);
|
||||||
|
/// <summary> If <see langword="true"/>, a user can create guild expressions in this guild.</summary>
|
||||||
|
public bool CreateGuildExpressions => Permissions.GetValue(RawValue, GuildPermission.CreateGuildExpressions);
|
||||||
/// <summary> If <see langword="true"/>, a user can set the status of a voice channel.</summary>
|
/// <summary> If <see langword="true"/>, a user can set the status of a voice channel.</summary>
|
||||||
public bool SetVoiceChannelStatus => Permissions.GetValue(RawValue, GuildPermission.SetVoiceChannelStatus);
|
public bool SetVoiceChannelStatus => Permissions.GetValue(RawValue, GuildPermission.SetVoiceChannelStatus);
|
||||||
|
|
||||||
@@ -164,6 +168,8 @@ namespace Discord
|
|||||||
bool? useSoundboard = null,
|
bool? useSoundboard = null,
|
||||||
bool? viewMonetizationAnalytics = null,
|
bool? viewMonetizationAnalytics = null,
|
||||||
bool? sendVoiceMessages = null,
|
bool? sendVoiceMessages = null,
|
||||||
|
bool? useClydeAI = null,
|
||||||
|
bool? createGuildExpressions = null,
|
||||||
bool? setVoiceChannelStatus = null)
|
bool? setVoiceChannelStatus = null)
|
||||||
{
|
{
|
||||||
ulong value = initialValue;
|
ulong value = initialValue;
|
||||||
@@ -212,6 +218,8 @@ namespace Discord
|
|||||||
Permissions.SetValue(ref value, useSoundboard, GuildPermission.UseSoundboard);
|
Permissions.SetValue(ref value, useSoundboard, GuildPermission.UseSoundboard);
|
||||||
Permissions.SetValue(ref value, viewMonetizationAnalytics, GuildPermission.ViewMonetizationAnalytics);
|
Permissions.SetValue(ref value, viewMonetizationAnalytics, GuildPermission.ViewMonetizationAnalytics);
|
||||||
Permissions.SetValue(ref value, sendVoiceMessages, GuildPermission.SendVoiceMessages);
|
Permissions.SetValue(ref value, sendVoiceMessages, GuildPermission.SendVoiceMessages);
|
||||||
|
Permissions.SetValue(ref value, useClydeAI, GuildPermission.UseClydeAI);
|
||||||
|
Permissions.SetValue(ref value, createGuildExpressions, GuildPermission.CreateGuildExpressions);
|
||||||
Permissions.SetValue(ref value, setVoiceChannelStatus, GuildPermission.SetVoiceChannelStatus);
|
Permissions.SetValue(ref value, setVoiceChannelStatus, GuildPermission.SetVoiceChannelStatus);
|
||||||
|
|
||||||
RawValue = value;
|
RawValue = value;
|
||||||
@@ -263,6 +271,8 @@ namespace Discord
|
|||||||
bool useSoundboard = false,
|
bool useSoundboard = false,
|
||||||
bool viewMonetizationAnalytics = false,
|
bool viewMonetizationAnalytics = false,
|
||||||
bool sendVoiceMessages = false,
|
bool sendVoiceMessages = false,
|
||||||
|
bool useClydeAI = false,
|
||||||
|
bool createGuildExpressions = false,
|
||||||
bool setVoiceChannelStatus = false)
|
bool setVoiceChannelStatus = false)
|
||||||
: this(0,
|
: this(0,
|
||||||
createInstantInvite: createInstantInvite,
|
createInstantInvite: createInstantInvite,
|
||||||
@@ -309,6 +319,8 @@ namespace Discord
|
|||||||
useSoundboard: useSoundboard,
|
useSoundboard: useSoundboard,
|
||||||
viewMonetizationAnalytics: viewMonetizationAnalytics,
|
viewMonetizationAnalytics: viewMonetizationAnalytics,
|
||||||
sendVoiceMessages: sendVoiceMessages,
|
sendVoiceMessages: sendVoiceMessages,
|
||||||
|
useClydeAI: useClydeAI,
|
||||||
|
createGuildExpressions: createGuildExpressions,
|
||||||
setVoiceChannelStatus: setVoiceChannelStatus)
|
setVoiceChannelStatus: setVoiceChannelStatus)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -358,13 +370,15 @@ namespace Discord
|
|||||||
bool? useSoundboard = null,
|
bool? useSoundboard = null,
|
||||||
bool? viewMonetizationAnalytics = null,
|
bool? viewMonetizationAnalytics = null,
|
||||||
bool? sendVoiceMessages = null,
|
bool? sendVoiceMessages = null,
|
||||||
|
bool? useClydeAI = null,
|
||||||
|
bool? createGuildExpressions = null,
|
||||||
bool? setVoiceChannelStatus = null)
|
bool? setVoiceChannelStatus = null)
|
||||||
=> new GuildPermissions(RawValue, createInstantInvite, kickMembers, banMembers, administrator, manageChannels, manageGuild, addReactions,
|
=> new GuildPermissions(RawValue, createInstantInvite, kickMembers, banMembers, administrator, manageChannels, manageGuild, addReactions,
|
||||||
viewAuditLog, viewGuildInsights, viewChannel, sendMessages, sendTTSMessages, manageMessages, embedLinks, attachFiles,
|
viewAuditLog, viewGuildInsights, viewChannel, sendMessages, sendTTSMessages, manageMessages, embedLinks, attachFiles,
|
||||||
readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, moveMembers,
|
readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, moveMembers,
|
||||||
useVoiceActivation, prioritySpeaker, stream, changeNickname, manageNicknames, manageRoles, manageWebhooks, manageEmojisAndStickers,
|
useVoiceActivation, prioritySpeaker, stream, changeNickname, manageNicknames, manageRoles, manageWebhooks, manageEmojisAndStickers,
|
||||||
useApplicationCommands, requestToSpeak, manageEvents, manageThreads, createPublicThreads, createPrivateThreads, useExternalStickers, sendMessagesInThreads,
|
useApplicationCommands, requestToSpeak, manageEvents, manageThreads, createPublicThreads, createPrivateThreads, useExternalStickers, sendMessagesInThreads,
|
||||||
startEmbeddedActivities, moderateMembers, useSoundboard, viewMonetizationAnalytics, sendVoiceMessages, setVoiceChannelStatus);
|
startEmbeddedActivities, moderateMembers, useSoundboard, viewMonetizationAnalytics, sendVoiceMessages, useClydeAI, createGuildExpressions, setVoiceChannelStatus);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a value that indicates if a specific <see cref="GuildPermission"/> is enabled
|
/// Returns a value that indicates if a specific <see cref="GuildPermission"/> is enabled
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Discord.API
|
namespace Discord.API;
|
||||||
|
|
||||||
|
internal class Application
|
||||||
{
|
{
|
||||||
internal class Application
|
|
||||||
{
|
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
[JsonProperty("rpc_origins")]
|
[JsonProperty("rpc_origins")]
|
||||||
@@ -59,5 +59,39 @@ namespace Discord.API
|
|||||||
[JsonProperty("redirect_uris")]
|
[JsonProperty("redirect_uris")]
|
||||||
public Optional<string[]> RedirectUris { get; set; }
|
public Optional<string[]> RedirectUris { get; set; }
|
||||||
|
|
||||||
}
|
[JsonProperty("discoverability_state")]
|
||||||
|
public Optional<ApplicationDiscoverabilityState> DiscoverabilityState { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("discovery_eligibility_flags")]
|
||||||
|
public Optional<DiscoveryEligibilityFlags> DiscoveryEligibilityFlags { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("explicit_content_filter")]
|
||||||
|
public Optional<ApplicationExplicitContentFilterLevel> ExplicitContentFilter { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hook")]
|
||||||
|
public bool IsHook { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("interactions_event_types")]
|
||||||
|
public Optional<string[]> InteractionsEventTypes { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("interactions_version")]
|
||||||
|
public Optional<ApplicationInteractionsVersion> InteractionsVersion { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("is_monetized")]
|
||||||
|
public bool IsMonetized { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("monetization_eligibility_flags")]
|
||||||
|
public Optional<ApplicationMonetizationEligibilityFlags> MonetizationEligibilityFlags { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("monetization_state")]
|
||||||
|
public Optional<ApplicationMonetizationState> MonetizationState { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("rpc_application_state")]
|
||||||
|
public Optional<ApplicationRpcState> RpcState { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("store_application_state")]
|
||||||
|
public Optional<ApplicationStoreState> StoreState { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("verification_state")]
|
||||||
|
public Optional<ApplicationVerificationState> VerificationState { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,9 @@ namespace Discord.API
|
|||||||
[JsonProperty("max_stage_video_channel_users")]
|
[JsonProperty("max_stage_video_channel_users")]
|
||||||
public Optional<int> MaxStageVideoChannelUsers { get; set; }
|
public Optional<int> MaxStageVideoChannelUsers { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("inventory_settings")]
|
||||||
|
public Optional<GuildInventorySettings> InventorySettings { get; set; }
|
||||||
|
|
||||||
[JsonProperty("incidents_data")]
|
[JsonProperty("incidents_data")]
|
||||||
public GuildIncidentsData IncidentsData { get; set; }
|
public GuildIncidentsData IncidentsData { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Discord.API;
|
||||||
|
|
||||||
|
internal class GuildInventorySettings
|
||||||
|
{
|
||||||
|
[JsonProperty("is_emoji_pack_collectible")]
|
||||||
|
public Optional<bool> IsEmojiPackCollectible { get; set; }
|
||||||
|
}
|
||||||
@@ -457,7 +457,7 @@ namespace Discord.Rest
|
|||||||
AvailableTags = props.Tags.GetValueOrDefault(Array.Empty<ForumTagProperties>()).Select(
|
AvailableTags = props.Tags.GetValueOrDefault(Array.Empty<ForumTagProperties>()).Select(
|
||||||
x => new ModifyForumTagParams
|
x => new ModifyForumTagParams
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id ?? Optional<ulong>.Unspecified,
|
||||||
Name = x.Name,
|
Name = x.Name,
|
||||||
EmojiId = x.Emoji is Emote emote
|
EmojiId = x.Emoji is Emote emote
|
||||||
? emote.Id
|
? emote.Id
|
||||||
@@ -1197,8 +1197,8 @@ namespace Discord.Rest
|
|||||||
|
|
||||||
if (args.RegexPatterns.IsSpecified)
|
if (args.RegexPatterns.IsSpecified)
|
||||||
{
|
{
|
||||||
if (args.TriggerType.Value is not AutoModTriggerType.Keyword)
|
if (args.TriggerType.Value is not AutoModTriggerType.Keyword and not AutoModTriggerType.MemberProfile)
|
||||||
throw new ArgumentException(message: $"Regex patterns can only be used with 'Keyword' trigger type.", paramName: nameof(args.RegexPatterns));
|
throw new ArgumentException(message: $"Regex patterns can only be used with 'Keyword' or 'MemberProfile' trigger type.", paramName: nameof(args.RegexPatterns));
|
||||||
|
|
||||||
Preconditions.AtMost(args.RegexPatterns.Value.Length, AutoModRuleProperties.MaxRegexPatternCount, nameof(args.RegexPatterns), $"Regex pattern count must be less than or equal to {AutoModRuleProperties.MaxRegexPatternCount}.");
|
Preconditions.AtMost(args.RegexPatterns.Value.Length, AutoModRuleProperties.MaxRegexPatternCount, nameof(args.RegexPatterns), $"Regex pattern count must be less than or equal to {AutoModRuleProperties.MaxRegexPatternCount}.");
|
||||||
|
|
||||||
@@ -1208,8 +1208,8 @@ namespace Discord.Rest
|
|||||||
|
|
||||||
if (args.KeywordFilter.IsSpecified)
|
if (args.KeywordFilter.IsSpecified)
|
||||||
{
|
{
|
||||||
if (args.TriggerType.Value != AutoModTriggerType.Keyword)
|
if (args.TriggerType.Value is not AutoModTriggerType.Keyword and not AutoModTriggerType.MemberProfile)
|
||||||
throw new ArgumentException(message: $"Keyword filter can only be used with 'Keyword' trigger type.", paramName: nameof(args.KeywordFilter));
|
throw new ArgumentException(message: $"Keyword filter can only be used with 'Keyword' or 'MemberProfile' trigger type.", paramName: nameof(args.KeywordFilter));
|
||||||
|
|
||||||
Preconditions.AtMost(args.KeywordFilter.Value.Length, AutoModRuleProperties.MaxKeywordCount, nameof(args.KeywordFilter), $"Keyword count must be less than or equal to {AutoModRuleProperties.MaxKeywordCount}");
|
Preconditions.AtMost(args.KeywordFilter.Value.Length, AutoModRuleProperties.MaxKeywordCount, nameof(args.KeywordFilter), $"Keyword count must be less than or equal to {AutoModRuleProperties.MaxKeywordCount}");
|
||||||
|
|
||||||
@@ -1222,8 +1222,8 @@ namespace Discord.Rest
|
|||||||
|
|
||||||
if (args.AllowList.IsSpecified)
|
if (args.AllowList.IsSpecified)
|
||||||
{
|
{
|
||||||
if (args.TriggerType.Value is not AutoModTriggerType.Keyword or AutoModTriggerType.KeywordPreset)
|
if (args.TriggerType.Value is not AutoModTriggerType.Keyword and not AutoModTriggerType.KeywordPreset and not AutoModTriggerType.MemberProfile)
|
||||||
throw new ArgumentException(message: $"Allow list can only be used with 'Keyword' or 'KeywordPreset' trigger type.", paramName: nameof(args.AllowList));
|
throw new ArgumentException(message: $"Allow list can only be used with 'Keyword', 'KeywordPreset' or 'MemberProfile' trigger type.", paramName: nameof(args.AllowList));
|
||||||
|
|
||||||
if (args.TriggerType.Value is AutoModTriggerType.Keyword)
|
if (args.TriggerType.Value is AutoModTriggerType.Keyword)
|
||||||
Preconditions.AtMost(args.AllowList.Value.Length, AutoModRuleProperties.MaxAllowListCountKeyword, nameof(args.AllowList), $"Allow list entry count must be less than or equal to {AutoModRuleProperties.MaxAllowListCountKeyword}.");
|
Preconditions.AtMost(args.AllowList.Value.Length, AutoModRuleProperties.MaxAllowListCountKeyword, nameof(args.AllowList), $"Allow list entry count must be less than or equal to {AutoModRuleProperties.MaxAllowListCountKeyword}.");
|
||||||
@@ -1258,7 +1258,7 @@ namespace Discord.Rest
|
|||||||
if (args.ExemptChannels.IsSpecified)
|
if (args.ExemptChannels.IsSpecified)
|
||||||
Preconditions.AtMost(args.ExemptChannels.Value.Length, AutoModRuleProperties.MaxExemptChannels, nameof(args.ExemptChannels), $"Exempt channels count must be less than or equal to {AutoModRuleProperties.MaxExemptChannels}.");
|
Preconditions.AtMost(args.ExemptChannels.Value.Length, AutoModRuleProperties.MaxExemptChannels, nameof(args.ExemptChannels), $"Exempt channels count must be less than or equal to {AutoModRuleProperties.MaxExemptChannels}.");
|
||||||
|
|
||||||
if (!args.Actions.IsSpecified && args.Actions.Value.Length == 0)
|
if (!args.Actions.IsSpecified || args.Actions.Value.Length == 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentException(message: $"At least 1 action must be set for an auto moderation rule.", paramName: nameof(args.Actions));
|
throw new ArgumentException(message: $"At least 1 action must be set for an auto moderation rule.", paramName: nameof(args.Actions));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,9 @@ namespace Discord.Rest
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public GuildIncidentsData IncidentsData { get; private set; }
|
public GuildIncidentsData IncidentsData { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public GuildInventorySettings? InventorySettings { get; private set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
||||||
|
|
||||||
@@ -204,6 +207,8 @@ namespace Discord.Rest
|
|||||||
ApproximatePresenceCount = model.ApproximatePresenceCount.Value;
|
ApproximatePresenceCount = model.ApproximatePresenceCount.Value;
|
||||||
if (model.IsBoostProgressBarEnabled.IsSpecified)
|
if (model.IsBoostProgressBarEnabled.IsSpecified)
|
||||||
IsBoostProgressBarEnabled = model.IsBoostProgressBarEnabled.Value;
|
IsBoostProgressBarEnabled = model.IsBoostProgressBarEnabled.Value;
|
||||||
|
if (model.InventorySettings.IsSpecified)
|
||||||
|
InventorySettings = model.InventorySettings.Value is null ? null : new (model.InventorySettings.Value.IsEmojiPackCollectible.GetValueOrDefault(false));
|
||||||
|
|
||||||
if (model.Emojis != null)
|
if (model.Emojis != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,6 +64,42 @@ namespace Discord.Rest
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ApplicationInstallParams InstallParams { get; private set; }
|
public ApplicationInstallParams InstallParams { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationDiscoverabilityState DiscoverabilityState { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public DiscoveryEligibilityFlags DiscoveryEligibilityFlags { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationExplicitContentFilterLevel ExplicitContentFilterLevel { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool IsHook { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IReadOnlyCollection<string> InteractionEventTypes { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationInteractionsVersion InteractionsVersion { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool IsMonetized { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationMonetizationEligibilityFlags MonetizationEligibilityFlags { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationMonetizationState MonetizationState { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationRpcState RpcState { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationStoreState StoreState { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ApplicationVerificationState VerificationState { get; private set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IReadOnlyCollection<string> Tags { get; private set; }
|
public IReadOnlyCollection<string> Tags { get; private set; }
|
||||||
|
|
||||||
@@ -113,6 +149,22 @@ namespace Discord.Rest
|
|||||||
RedirectUris = model.RedirectUris.Value.ToImmutableArray();
|
RedirectUris = model.RedirectUris.Value.ToImmutableArray();
|
||||||
|
|
||||||
ApproximateGuildCount = model.ApproximateGuildCount.IsSpecified ? model.ApproximateGuildCount.Value : null;
|
ApproximateGuildCount = model.ApproximateGuildCount.IsSpecified ? model.ApproximateGuildCount.Value : null;
|
||||||
|
|
||||||
|
DiscoverabilityState = model.DiscoverabilityState.GetValueOrDefault(ApplicationDiscoverabilityState.None);
|
||||||
|
DiscoveryEligibilityFlags = model.DiscoveryEligibilityFlags.GetValueOrDefault(DiscoveryEligibilityFlags.None);
|
||||||
|
ExplicitContentFilterLevel = model.ExplicitContentFilter.GetValueOrDefault(ApplicationExplicitContentFilterLevel.Disabled);
|
||||||
|
IsHook = model.IsHook;
|
||||||
|
|
||||||
|
InteractionEventTypes = model.InteractionsEventTypes.GetValueOrDefault(Array.Empty<string>()).ToImmutableArray();
|
||||||
|
InteractionsVersion = model.InteractionsVersion.GetValueOrDefault(ApplicationInteractionsVersion.Version1);
|
||||||
|
|
||||||
|
IsMonetized = model.IsMonetized;
|
||||||
|
MonetizationEligibilityFlags = model.MonetizationEligibilityFlags.GetValueOrDefault(ApplicationMonetizationEligibilityFlags.None);
|
||||||
|
MonetizationState = model.MonetizationState.GetValueOrDefault(ApplicationMonetizationState.None);
|
||||||
|
|
||||||
|
RpcState = model.RpcState.GetValueOrDefault(ApplicationRpcState.Disabled);
|
||||||
|
StoreState = model.StoreState.GetValueOrDefault(ApplicationStoreState.None);
|
||||||
|
VerificationState = model.VerificationState.GetValueOrDefault(ApplicationVerificationState.Ineligible);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <exception cref="InvalidOperationException">Unable to update this object from a different application token.</exception>
|
/// <exception cref="InvalidOperationException">Unable to update this object from a different application token.</exception>
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ namespace Discord.WebSocket
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public GuildIncidentsData IncidentsData { get; private set; }
|
public GuildIncidentsData IncidentsData { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public GuildInventorySettings? InventorySettings { get; private set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -571,6 +574,9 @@ namespace Discord.WebSocket
|
|||||||
PreferredCulture = PreferredLocale == null ? null : new CultureInfo(PreferredLocale);
|
PreferredCulture = PreferredLocale == null ? null : new CultureInfo(PreferredLocale);
|
||||||
if (model.IsBoostProgressBarEnabled.IsSpecified)
|
if (model.IsBoostProgressBarEnabled.IsSpecified)
|
||||||
IsBoostProgressBarEnabled = model.IsBoostProgressBarEnabled.Value;
|
IsBoostProgressBarEnabled = model.IsBoostProgressBarEnabled.Value;
|
||||||
|
if (model.InventorySettings.IsSpecified)
|
||||||
|
InventorySettings = model.InventorySettings.Value is null ? null : new(model.InventorySettings.Value.IsEmojiPackCollectible.GetValueOrDefault(false));
|
||||||
|
|
||||||
IncidentsData = model.IncidentsData is not null
|
IncidentsData = model.IncidentsData is not null
|
||||||
? new GuildIncidentsData { DmsDisabledUntil = model.IncidentsData.DmsDisabledUntil, InvitesDisabledUntil = model.IncidentsData.InvitesDisabledUntil }
|
? new GuildIncidentsData { DmsDisabledUntil = model.IncidentsData.DmsDisabledUntil, InvitesDisabledUntil = model.IncidentsData.InvitesDisabledUntil }
|
||||||
: new GuildIncidentsData();
|
: new GuildIncidentsData();
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace Discord
|
|||||||
AssertFlag(() => new ChannelPermissions(useSoundboard: true), ChannelPermission.UseSoundboard);
|
AssertFlag(() => new ChannelPermissions(useSoundboard: true), ChannelPermission.UseSoundboard);
|
||||||
AssertFlag(() => new ChannelPermissions(createEvents: true), ChannelPermission.CreateEvents);
|
AssertFlag(() => new ChannelPermissions(createEvents: true), ChannelPermission.CreateEvents);
|
||||||
AssertFlag(() => new ChannelPermissions(sendVoiceMessages: true), ChannelPermission.SendVoiceMessages);
|
AssertFlag(() => new ChannelPermissions(sendVoiceMessages: true), ChannelPermission.SendVoiceMessages);
|
||||||
|
AssertFlag(() => new ChannelPermissions(useClydeAI: true), ChannelPermission.UseClydeAI);
|
||||||
AssertFlag(() => new ChannelPermissions(setVoiceChannelStatus: true), ChannelPermission.SetVoiceChannelStatus);
|
AssertFlag(() => new ChannelPermissions(setVoiceChannelStatus: true), ChannelPermission.SetVoiceChannelStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,6 +160,7 @@ namespace Discord
|
|||||||
AssertUtil(ChannelPermission.PrioritySpeaker, x => x.PrioritySpeaker, (p, enable) => p.Modify(prioritySpeaker: enable));
|
AssertUtil(ChannelPermission.PrioritySpeaker, x => x.PrioritySpeaker, (p, enable) => p.Modify(prioritySpeaker: enable));
|
||||||
AssertUtil(ChannelPermission.Stream, x => x.Stream, (p, enable) => p.Modify(stream: enable));
|
AssertUtil(ChannelPermission.Stream, x => x.Stream, (p, enable) => p.Modify(stream: enable));
|
||||||
AssertUtil(ChannelPermission.SendVoiceMessages, x => x.SendVoiceMessages, (p, enable) => p.Modify(sendVoiceMessages: enable));
|
AssertUtil(ChannelPermission.SendVoiceMessages, x => x.SendVoiceMessages, (p, enable) => p.Modify(sendVoiceMessages: enable));
|
||||||
|
AssertUtil(ChannelPermission.UseClydeAI, x => x.UseClydeAI, (p, enable) => p.Modify(useClydeAI: enable));
|
||||||
AssertUtil(ChannelPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
|
AssertUtil(ChannelPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ namespace Discord
|
|||||||
AssertFlag(() => new GuildPermissions(viewMonetizationAnalytics: true), GuildPermission.ViewMonetizationAnalytics);
|
AssertFlag(() => new GuildPermissions(viewMonetizationAnalytics: true), GuildPermission.ViewMonetizationAnalytics);
|
||||||
AssertFlag(() => new GuildPermissions(useSoundboard: true), GuildPermission.UseSoundboard);
|
AssertFlag(() => new GuildPermissions(useSoundboard: true), GuildPermission.UseSoundboard);
|
||||||
AssertFlag(() => new GuildPermissions(sendVoiceMessages: true), GuildPermission.SendVoiceMessages);
|
AssertFlag(() => new GuildPermissions(sendVoiceMessages: true), GuildPermission.SendVoiceMessages);
|
||||||
|
AssertFlag(() => new GuildPermissions(useClydeAI: true), GuildPermission.UseClydeAI);
|
||||||
|
AssertFlag(() => new GuildPermissions(createGuildExpressions: true), GuildPermission.CreateGuildExpressions);
|
||||||
AssertFlag(() => new GuildPermissions(setVoiceChannelStatus: true), GuildPermission.SetVoiceChannelStatus);
|
AssertFlag(() => new GuildPermissions(setVoiceChannelStatus: true), GuildPermission.SetVoiceChannelStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,6 +187,8 @@ namespace Discord
|
|||||||
AssertUtil(GuildPermission.ViewMonetizationAnalytics, x => x.ViewMonetizationAnalytics, (p, enable) => p.Modify(viewMonetizationAnalytics: enable));
|
AssertUtil(GuildPermission.ViewMonetizationAnalytics, x => x.ViewMonetizationAnalytics, (p, enable) => p.Modify(viewMonetizationAnalytics: enable));
|
||||||
AssertUtil(GuildPermission.UseSoundboard, x => x.UseSoundboard, (p, enable) => p.Modify(useSoundboard: enable));
|
AssertUtil(GuildPermission.UseSoundboard, x => x.UseSoundboard, (p, enable) => p.Modify(useSoundboard: enable));
|
||||||
AssertUtil(GuildPermission.SendVoiceMessages, x => x.SendVoiceMessages, (p, enable) => p.Modify(sendVoiceMessages: enable));
|
AssertUtil(GuildPermission.SendVoiceMessages, x => x.SendVoiceMessages, (p, enable) => p.Modify(sendVoiceMessages: enable));
|
||||||
|
AssertUtil(GuildPermission.UseClydeAI, x => x.UseClydeAI, (p, enable) => p.Modify(useClydeAI: enable));
|
||||||
|
AssertUtil(GuildPermission.CreateGuildExpressions, x => x.CreateGuildExpressions, (p, enable) => p.Modify(createGuildExpressions: enable));
|
||||||
AssertUtil(GuildPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
|
AssertUtil(GuildPermission.SetVoiceChannelStatus, x => x.SetVoiceChannelStatus, (p, enable) => p.Modify(setVoiceChannelStatus: enable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user