Skip to content

Conversation

Readeem
Copy link
Contributor

@Readeem Readeem commented Oct 8, 2025

Looking at the current release candidate (v0.19.0-rc.7) found out the issue with cache config:
config struct is now private, we as library users cannot directly set it's fields other than using With opts.
Before, if a config opt was missing, I could use something like:

bot.WithCacheConfigOpts(
	func(c *cache.Config) {
		c.SelfUserCache = NewCustomSelfUserCache()
	},
)

But now some of With opts are missing, making it impossible to workaround.
So here I implemented missing opts. Also I checked every other place where config opts pattern is used, and probably cache package is the only place where I found issues.

@topi314 topi314 merged commit a6ca69b into disgoorg:master Oct 8, 2025
4 checks passed
@topi314
Copy link
Member

topi314 commented Oct 8, 2025

The reason for this change was to reduce the api surface and allow better flexibility internal.
Thanks for adding the missing opts, seems like I missed them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants