[Feature] Config Bypass for CanSendResponse (#2932)

* Adds bool switch for DeferAsyncTimeCheck in DiscordConfig

* Adds DeferAsyncTimeCheck bool to DiscordSocketClient

* Adds DeferAsyncTimeCheck to DeferAsync in SocketCommandBase

* Adds DeferAsyncTimeCheck to DeferAsync in SocketModal

* Adds DeferAsyncTimeCheck to DeferAsync in SocketMessageComponent

* Changes name of DeferAsyncTimeCheck to be more general

* Moves ResponseInternalTimeCheck from socket client to base client

* Adds ResponseInternalTimeCheck to Rest interactions

* Adds ResponseInternalTimeCheck to socket interactions
This commit is contained in:
Bence Szucs
2024-05-16 17:25:21 -04:00
committed by GitHub
parent aa424f6f37
commit 9030a5b2bb
10 changed files with 39 additions and 29 deletions

View File

@@ -205,6 +205,14 @@ namespace Discord
/// </remarks>
public bool UseInteractionSnowflakeDate { get; set; } = true;
/// <summary>
/// Gets or sets whether or not any responses to Discord will make an internal expiration check.
/// </summary>
/// <remarks>
/// This should generally be set to <see langword="false"/> in a development environment due to potential latency issues.
/// </remarks>
public bool ResponseInternalTimeCheck { get; set; } = true;
/// <summary>
/// Gets or sets if the Rest/Socket user <see cref="object.ToString"/> override formats the string in respect to bidirectional unicode.
/// </summary>