diff --git a/src/Discord.Net.Core/DiscordErrorCode.cs b/src/Discord.Net.Core/DiscordErrorCode.cs index 5a5223b93..61516a0ff 100644 --- a/src/Discord.Net.Core/DiscordErrorCode.cs +++ b/src/Discord.Net.Core/DiscordErrorCode.cs @@ -65,6 +65,7 @@ namespace Discord OnlyOwnerAction = 20018, AnnouncementEditRatelimit = 20022, ChannelWriteRatelimit = 20028, + WriteRatelimitReached = 20029, WordsNotAllowed = 20031, GuildPremiumTooLow = 20035, #endregion @@ -139,6 +140,7 @@ namespace Discord FileUploadTooBig = 50045, InvalidFileUpload = 50046, CannotSelfRedeemGift = 50054, + InvalidGuild = 50055, PaymentSourceRequiredForGift = 50070, CannotDeleteRequiredCommunityChannel = 50074, InvalidSticker = 50081, diff --git a/src/Discord.Net.Interactions/InteractionService.cs b/src/Discord.Net.Interactions/InteractionService.cs index 6c2a70f16..d7192129d 100644 --- a/src/Discord.Net.Interactions/InteractionService.cs +++ b/src/Discord.Net.Interactions/InteractionService.cs @@ -67,7 +67,7 @@ namespace Discord.Interactions internal readonly LogManager _logManager; internal readonly Func _getRestClient; - internal readonly bool _throwOnError, _deleteUnkownSlashCommandAck, _useCompiledLambda, _enableAutocompleteHandlers; + internal readonly bool _throwOnError, _useCompiledLambda, _enableAutocompleteHandlers; internal readonly string _wildCardExp; internal readonly RunMode _runMode; internal readonly RestResponseCallback _restResponseCallback; @@ -153,7 +153,6 @@ namespace Discord.Interactions throw new InvalidOperationException($"RunMode cannot be set to {RunMode.Default}"); _throwOnError = config.ThrowOnError; - _deleteUnkownSlashCommandAck = config.DeleteUnknownSlashCommandAck; _wildCardExp = config.WildCardExpression; _useCompiledLambda = config.UseCompiledLambda; _enableAutocompleteHandlers = config.EnableAutocompleteHandlers; @@ -620,12 +619,6 @@ namespace Discord.Interactions { await _cmdLogger.DebugAsync($"Unknown slash command, skipping execution ({string.Join(" ", keywords).ToUpper()})"); - if (_deleteUnkownSlashCommandAck) - { - var response = await context.Interaction.GetOriginalResponseAsync().ConfigureAwait(false); - await response.DeleteAsync().ConfigureAwait(false); - } - await _slashCommandExecutedEvent.InvokeAsync(null, context, result).ConfigureAwait(false); return result; } diff --git a/src/Discord.Net.Interactions/InteractionServiceConfig.cs b/src/Discord.Net.Interactions/InteractionServiceConfig.cs index 8e495a5ca..e5ca5b9ec 100644 --- a/src/Discord.Net.Interactions/InteractionServiceConfig.cs +++ b/src/Discord.Net.Interactions/InteractionServiceConfig.cs @@ -33,11 +33,6 @@ namespace Discord.Interactions /// public string WildCardExpression { get; set; } - /// - /// Gets or sets the option to delete Slash Command acknowledgements if no Slash Command handler is found in the . - /// - public bool DeleteUnknownSlashCommandAck { get; set; } = true; - /// /// Gets or sets the option to use compiled lambda expressions to create module instances and execute commands. This method improves performance at the cost of memory. ///