forked from JDA-Applications/JDA-Utilities
-
-
Notifications
You must be signed in to change notification settings - Fork 24
User Installation Contexts
Olivia edited this page Jun 8, 2024
·
1 revision
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.
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:
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};
- SlashCommands in JDA-Chewtils
- Context Menus in JDA-Chewtils (Chewtils 2.0+)
- User-Installed Apps (Chewtils 2.1-SNAPSHOT)