Skip to content

Commit a6ca69b

Browse files
authored
add missing opts for cache config (#480)
1 parent ab94643 commit a6ca69b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cache/cache_config.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ func WithCaches(flags ...Flags) ConfigOpt {
127127
}
128128
}
129129

130+
// WithSelfUserCache sets the SelfUserCache of the config.
131+
func WithSelfUserCache(cache SelfUserCache) ConfigOpt {
132+
return func(config *config) {
133+
config.SelfUserCache = cache
134+
}
135+
}
136+
130137
// WithGuildCachePolicy sets the Policy[discord.Guild] of the config.
131138
func WithGuildCachePolicy(policy Policy[discord.Guild]) ConfigOpt {
132139
return func(config *config) {
@@ -183,6 +190,13 @@ func WithGuildScheduledEventCache(guildScheduledEventCache GuildScheduledEventCa
183190
}
184191
}
185192

193+
// WithGuildSoundboardSoundCachePolicy sets the Policy[discord.SoundboardSound] of the config.
194+
func WithGuildSoundboardSoundCachePolicy(policy Policy[discord.SoundboardSound]) ConfigOpt {
195+
return func(config *config) {
196+
config.GuildSoundboardSoundCachePolicy = policy
197+
}
198+
}
199+
186200
// WithGuildSoundboardSoundCache sets the GuildSoundboardSoundCache of the config.
187201
func WithGuildSoundboardSoundCache(guildSoundboardSoundCache GuildSoundboardSoundCache) ConfigOpt {
188202
return func(config *config) {

0 commit comments

Comments
 (0)