User Installation Contexts - Chew/JDA-Chewtils GitHub Wiki
:warning: This page is a work in progress! It might be subject to changes until the associated PR is merged!
As of TODO: FILL ME WHEN RELEASED, JDA-Chewtils now supports messaged being installed in user contexts. Here's how to do it, with a migration guide from the old system.
User Installable Commands
There is a new this.contexts option for Interactions. To enable it, start off by adding this:
this.contexts = new InteractionContextType[]{};
Now, depending on where you want it to be accessed, you can do the following:
Migration from this.guildOnly
If you still use the legacy this.guilyOnly, you need to replace that with one of the following:
this.guildOnly = true=>this.contexts = new InteractionContextType[]{InteractionContextType.GUILD};this.guildOnly = false(and you want it to be used everywhere) =>this.contexts = new InteractionContextType[]{InteractionContextType.GUILD, InteractionContextType.BOT_DM, InteractionContextType.PRIVATE_CHANNEL};this.guildOnly = false(but you just want it used in Bot DMs) =>this.contexts = new InteractionContextType[]{InteractionContextType.GUILD, InteractionContextType.BOT_DM};