Class DiscordSocketConfig
Represents a configuration class for Discord.WebSocket.DiscordSocketClient.
Assembly: Discord.Net.WebSocket.dll​
View Source​
public class DiscordSocketConfig : DiscordRestConfig
Properties​
GatewayHost​
Gets or sets the WebSocket host to connect to. If null
, the client will use the
/gateway endpoint.
View Source​
public string GatewayHost { get; set; }
ConnectionTimeout​
Gets or sets the time, in milliseconds, to wait for a connection to complete before aborting.
View Source​
public int ConnectionTimeout { get; set; }
ShardId​
Gets or sets the ID for this shard. Must be less than Discord.WebSocket.DiscordSocketConfig.TotalShards.
View Source​
public int? ShardId { get; set; }
TotalShards​
Gets or sets the total number of shards for this application.
View Source​
public int? TotalShards { get; set; }
AlwaysDownloadDefaultStickers​
Gets or sets whether or not the client should download the default stickers on startup.
View Source​
public bool AlwaysDownloadDefaultStickers { get; set; }
AlwaysResolveStickers​
Gets or sets whether or not the client should automatically resolve the stickers sent on a message.
View Source​
public bool AlwaysResolveStickers { get; set; }
MessageCacheSize​
Gets or sets the number of messages per channel that should be kept in cache. Setting this to zero disables the message cache entirely.
View Source​
public int MessageCacheSize { get; set; }
LargeThreshold​
Gets or sets the max number of users a guild may have for offline users to be included in the READY packet. The maximum value allowed is 250.
View Source​
public int LargeThreshold { get; set; }
WebSocketProvider​
Gets or sets the provider used to generate new WebSocket connections.
View Source​
public WebSocketProvider WebSocketProvider { get; set; }
UdpSocketProvider​
Gets or sets the provider used to generate new UDP sockets.
View Source​
public UdpSocketProvider UdpSocketProvider { get; set; }
AlwaysDownloadUsers​
Gets or sets whether or not all users should be downloaded as guilds come available.
View Source​
public bool AlwaysDownloadUsers { get; set; }
HandlerTimeout​
Gets or sets the timeout for event handlers, in milliseconds, after which a warning will be logged.
Setting this property to null
disables this check.
View Source​
public int? HandlerTimeout { get; set; }
IdentifyMaxConcurrency​
Gets or sets the maximum identify concurrency.
View Source​
public int IdentifyMaxConcurrency { get; set; }
MaxWaitBetweenGuildAvailablesBeforeReady​
Gets or sets the maximum wait time in milliseconds between GUILD_AVAILABLE events before firing READY. If zero, READY will fire as soon as it is received and all guilds will be unavailable.
View Source​
public int MaxWaitBetweenGuildAvailablesBeforeReady { get; set; }
GatewayIntents​
Gets or sets gateway intents to limit what events are sent from Discord. The default is Discord.GatewayIntents.AllUnprivileged.
View Source​
public GatewayIntents GatewayIntents { get; set; }
LogGatewayIntentWarnings​
Gets or sets whether or not to log warnings related to guild intents and events.
View Source​
public bool LogGatewayIntentWarnings { get; set; }
Fields​
GatewayEncoding​
Returns the encoding gateway should use.
View Source​
public const string GatewayEncoding = "json"