-
-
Couldn't load subscription status.
- Fork 102
Disabling Features
alphaBEE edited this page Mar 7, 2024
·
2 revisions
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.javafile.
- 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.javafor any reason.
- The