ClientOptions class Null safety
Optional client settings which can be used when creating new instance of client. It allows to tune up client to your needs.
Constructors
-
ClientOptions({AllowedMentions? allowedMentions, int? shardCount, int messageCacheSize = 400, bool forceFetchMembers = false, bool cacheMembers = true, int largeThreshold = 50, List<
String> ignoredEvents = const [], bool compressedGatewayPayloads = true, bool guildSubscriptions = true, PresenceBuilder? initialPresence, ShutdownHook? shutdownHook, ShutdownShardHook? shutdownShardHook, bool dispatchRawShardEvent = false}) -
Makes a new
ClientOptions
object.
Properties
- allowedMentions ↔ AllowedMentions?
-
Whether or not to disable @everyone and @here mentions at a global level.
It means client won't send any of these. It doesn't mean filtering guild messages.
read / write
- cacheMembers ↔ bool
-
Allows to disable member caching on
GUILD_CREATE
event. It means client will collect members from other eventsread / write - compressedGatewayPayloads ↔ bool
-
Allows to receive compressed payloads from gateway
read / write
- dispatchRawShardEvent ↔ bool
-
Allows to enable receiving raw gateway event
read / write
- forceFetchMembers ↔ bool
-
Whether or not to force fetch all of the members the client can see.
Can slow down ready times but is recommended if you rely on
Message.member
or the member cache.read / write - guildSubscriptions ↔ bool
-
Enables dispatching of guild subscription events (presence and typing events)
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
ignoredEvents
↔ List<
String> -
List of ignored events
read / write
- initialPresence ↔ PresenceBuilder?
-
Initial bot presence
read / write
- largeThreshold ↔ int
-
Maximum size of guild for which offline member will be sent
read / write
- messageCacheSize ↔ int
-
The number of messages to cache for each channel.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
The total number of shards.
read / write
- shutdownHook ↔ ShutdownHook?
-
Hook executed when disposing bots process. [...]
read / write
- shutdownShardHook ↔ ShutdownShardHook?
-
Hook executed when shard is disposing. [...]
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited