RestClientOptions constructor
const
RestClientOptions({
- List<
NyxxPlugin< plugins = const [],Nyxx> > - String loggerName = 'Nyxx',
- Duration? rateLimitWarningThreshold = const Duration(seconds: 10),
- CacheConfig<
User> userCacheConfig = _smallCacheConfig, - CacheConfig<
Channel> channelCacheConfig = _defaultCacheConfig, - CacheConfig<
Message> messageCacheConfig = _smallCacheConfig, - CacheConfig<
Webhook> webhookCacheConfig = _defaultCacheConfig, - CacheConfig<
Guild> guildCacheConfig = _defaultCacheConfig, - CacheConfig<
Member> memberCacheConfig = _smallCacheConfig, - CacheConfig<
Role> roleCacheConfig = _defaultCacheConfig, - CacheConfig<
Emoji> emojiCacheConfig = _smallCacheConfig, - CacheConfig<
GuildSticker> stickerCacheConfig = _smallCacheConfig, - CacheConfig<
GlobalSticker> globalStickerCacheConfig = _defaultCacheConfig, - CacheConfig<
StageInstance> stageInstanceCacheConfig = _defaultCacheConfig, - CacheConfig<
ScheduledEvent> scheduledEventCacheConfig = _smallCacheConfig, - CacheConfig<
AutoModerationRule> autoModerationRuleConfig = _smallCacheConfig, - CacheConfig<
Integration> integrationConfig = _smallCacheConfig, - CacheConfig<
AuditLogEntry> auditLogEntryConfig = _smallCacheConfig, - CacheConfig<
VoiceState> voiceStateConfig = _smallCacheConfig, - CacheConfig<
ApplicationCommand> applicationCommandConfig = _defaultCacheConfig, - CacheConfig<
CommandPermissions> commandPermissionsConfig = _smallCacheConfig, - CacheConfig<
Entitlement> entitlementConfig = _defaultCacheConfig, - CacheConfig<
Sku> skuConfig = _defaultCacheConfig, - CacheConfig<
Subscription> subscriptionConfig = _defaultCacheConfig, - CacheConfig<
SoundboardSound> globalSoundboardCacheConfig = _smallCacheConfig, - CacheConfig<
SoundboardSound> soundboardCacheConfig = _smallCacheConfig,
Create a new RestClientOptions.
Implementation
const RestClientOptions({
super.plugins,
super.loggerName,
super.rateLimitWarningThreshold,
// Users are generally not needed over long periods of time; use a small
// cache.
this.userCacheConfig = _smallCacheConfig,
this.channelCacheConfig = _defaultCacheConfig,
// Messages are generally not needed over long periods of time and are
// cached per channel anyway; use a small cache.
this.messageCacheConfig = _smallCacheConfig,
this.webhookCacheConfig = _defaultCacheConfig,
this.guildCacheConfig = _defaultCacheConfig,
// Members are generally not needed over long periods of time and are
// cached per guild anyway; use a small cache.
this.memberCacheConfig = _smallCacheConfig,
// Guilds tend not to have a large amount of roles (relatively speaking),
// but we also want to access all of a guild's roles during e.g permission
// calculations; use a larger cache.
this.roleCacheConfig = _defaultCacheConfig,
// Bots don't tend to use emoji or sticker data. Don't bother caching too
// many.
this.emojiCacheConfig = _smallCacheConfig,
this.stickerCacheConfig = _smallCacheConfig,
// ...but there are not too many global stickers, and they are the most
// used, so use a larger cache for these.
this.globalStickerCacheConfig = _defaultCacheConfig,
this.stageInstanceCacheConfig = _defaultCacheConfig,
this.scheduledEventCacheConfig = _smallCacheConfig,
this.autoModerationRuleConfig = _smallCacheConfig,
this.integrationConfig = _smallCacheConfig,
this.auditLogEntryConfig = _smallCacheConfig,
// Voice states are saved per guild, so we don't need to store large amount
// of them at a time.
this.voiceStateConfig = _smallCacheConfig,
this.applicationCommandConfig = _defaultCacheConfig,
this.commandPermissionsConfig = _smallCacheConfig,
this.entitlementConfig = _defaultCacheConfig,
this.skuConfig = _defaultCacheConfig,
this.subscriptionConfig = _defaultCacheConfig,
this.globalSoundboardCacheConfig = _smallCacheConfig,
this.soundboardCacheConfig = _smallCacheConfig,
});