Class DiscordConfiguration
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
Represents configuration for DiscordClient.
public sealed class DiscordConfiguration
- Inheritance
-
objectDiscordConfiguration
Constructors
- DiscordConfiguration()
Creates a new configuration with default values.
- DiscordConfiguration(DiscordConfiguration)
Creates a clone of another discord configuration.
Properties
- AbsoluteMessageCacheExpiration
Sets the default absolute expiration time for cached messages.
- AlwaysCacheMembers
Sets whether the client should attempt to cache members if exclusively using unprivileged intents.
This will only take effect if there are no GuildMembers or GuildPresences intents specified. Otherwise, this will always be overwritten to true.
Defaults to true.
- GatewayCompressionLevel
Sets the level of compression for WebSocket traffic.
Disabling this option will increase the amount of traffic sent via WebSocket. Setting Payload will enable compression for READY and GUILD_CREATE payloads. Setting System.IO.Stream will enable compression for the entire WebSocket stream, drastically reducing amount of traffic.
Defaults to None.
- LogUnknownAuditlogs
Whether to log unknown auditlog types and change keys or not. Defaults to true.
- LogUnknownEvents
Whether to log unknown events or not. Defaults to true.
- SlidingMessageCacheExpiration
Sets the default sliding expiration time for cached messages. This is refreshed every time the message is accessed.
- UdpClientFactory
Sets the factory method used to create instances of UDP clients.
Use DSharpPlus.Net.Udp.DspUdpClient.CreateNew() and equivalents on other implementations to switch out client implementations.
Defaults to DSharpPlus.Net.Udp.DspUdpClient.CreateNew().