-
-
Notifications
You must be signed in to change notification settings - Fork 90
Disabling Features
alphaBEE edited this page Mar 7, 2024
·
1 revision
If you need to blacklist a specific feature in your bot, follow these steps to exclude it from execution:
-
Identify the Feature:
- Determine the full class name (including the package) of the feature you want to blacklist.
- For example, let's assume the feature is named
ChatGptCommand.java
, located in the packageorg.togetherjava.tjbot.features.chatgpt
. - The full class name would be
org.togetherjava.tjbot.features.chatgpt.ChatGptCommand
.
-
Edit the Configuration File (
config.json
):- Open your bot's configuration file (
config.json
). - Locate the
"featureBlacklist"
section.
- Open your bot's configuration file (
-
Add the Feature to the Blacklist:
- Under
"normal"
, add the full class name of the feature you want to blacklist. - For example:
"featureBlacklist": { "normal": [ "org.togetherjava.tjbot.features.chatgpt.ChatGptCommand" ], "special": [] }
- The
"normal"
section will prevent the specified feature from being executed when added via theFeatures.java
file.
- Under
-
Save and Apply Changes:
- Save the configuration file.
- If your bot is running, restart it to apply the changes.
-
Additional Note:
- The
"special"
section can be used for features that are not added viaFeatures.java
for any reason.
- The