Docs
[ci skip]
This commit is contained in:
parent
8d0fde9789
commit
6b92339e80
|
@ -1,8 +1,18 @@
|
|||
part of nyxx;
|
||||
|
||||
/// Options for configuring cache. Allows to specify where and which entities should be cached and preserved in cache
|
||||
class CacheOptions {
|
||||
/// Defines in which locations members will be cached
|
||||
CachePolicyLocation memberCachePolicyLocation = CachePolicyLocation();
|
||||
|
||||
/// Defines which members are preserved in cache
|
||||
CachePolicy<Member> memberCachePolicy = MemberCachePolicy.def;
|
||||
|
||||
/// Defines where channel entities are preserved cache. Defaults to [CachePolicyLocation] with additional objectConstructor set to true
|
||||
CachePolicyLocation channelCachePolicyLocation = CachePolicyLocation()..objectConstructor = true;
|
||||
|
||||
/// Defines which channel entities are preserved in cache.
|
||||
CachePolicy<IChannel> channelCachePolicy = ChannelCachePolicy.def;
|
||||
}
|
||||
|
||||
/// Optional client settings which can be used when creating new instance
|
||||
|
|
|
@ -93,7 +93,7 @@ class Shard implements Disposable {
|
|||
throw InvalidShardException._new("Cannot request member for guild on wrong shard");
|
||||
}
|
||||
|
||||
guildPayload = guild.toString();
|
||||
guildPayload = [guild.toString()];
|
||||
} else if (guild is Iterable<Snowflake>) {
|
||||
if(!this.guilds.any((element) => guild.contains(element))) {
|
||||
throw InvalidShardException._new("Cannot request member for guild on wrong shard");
|
||||
|
@ -106,10 +106,10 @@ class Shard implements Disposable {
|
|||
|
||||
final payload = <String, dynamic>{
|
||||
"guild_id": guildPayload,
|
||||
if (query != null) "query": query,
|
||||
if (userIds != null) "user_ids": userIds.map((e) => e.toString()).toList(),
|
||||
"limit": limit,
|
||||
"presences": presences,
|
||||
if (query != null) "query": query,
|
||||
if (userIds != null) "user_ids": userIds.map((e) => e.toString()).toList(),
|
||||
if (nonce != null) "nonce": nonce
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue