You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue with Kord Extensions, which recently gained a new feature to automatically enable the intents required for commands and event handlers to work. This has resulted in a load order issue.
In order for intents to be registered properly, all extensions must have been set up before the Kord instance is constructed via the KordBuilder. This is because the KordBuilder has a single intents property rather than an intents builder that's evaluated as part of login. However, this means that it's now unsafe to try to access the bot's Kord instance during extension setup, as it doesn't yet exist.
So, this issue is a formal request to change the intents property in KordBuilder to a DSL function that registers an intents builder which is called just before login in order to resolve the required intents.
I've worked around this in KordEx for now, but it does make some things considerably less intuitive, so it'd be great to get this looked at.
The text was updated successfully, but these errors were encountered:
If the proposed builder is only called when logging in then we should just move the intents to the log in function instead. We've had requests from other users to modify intents between gateway identifies, which would also be solved by this change.
The notable downside is that intents won't be usable by other parts of the API (I can only think of cache being potentially affected), and if we are to move it to the log in call it'll become the user's responsibility to remember intents between manual log in attempts (not sure how many times people actually manually reconnect, but I don't think it'd be much of an issue).
I feel like "builder supplied early and called at login" negates the last downside there, but you're probably right that it isn't much of an issue - bots at that scale are going to be frameworking that anyway, I think.
I'm running into an issue with Kord Extensions, which recently gained a new feature to automatically enable the intents required for commands and event handlers to work. This has resulted in a load order issue.
In order for intents to be registered properly, all extensions must have been set up before the
Kord
instance is constructed via theKordBuilder
. This is because theKordBuilder
has a singleintents
property rather than an intents builder that's evaluated as part of login. However, this means that it's now unsafe to try to access the bot'sKord
instance during extension setup, as it doesn't yet exist.So, this issue is a formal request to change the
intents
property inKordBuilder
to a DSL function that registers an intents builder which is called just before login in order to resolve the required intents.I've worked around this in KordEx for now, but it does make some things considerably less intuitive, so it'd be great to get this looked at.
The text was updated successfully, but these errors were encountered: