Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions application/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
"heavyModerationRolePattern": "Moderator",
"softModerationRolePattern": "Moderator|Staff Assistant",
"tagManageRolePattern": "Moderator|Staff Assistant|Top Helpers .+",
"freeCommand": [
{
"inactiveChannelDuration": "PT2H",
"messageRetrieveLimit": 10,
"statusChannel": <put_a_channel_id_here>,
"monitoredChannels": [
<put_a_channel_id_here>
]
}
],
"helpChannelPattern": "([a-zA-Z_]+_)?help(_\\d+)?",
"suggestions": {
"channelPattern": "tj_suggestions",
Expand All @@ -33,5 +23,26 @@
"suspiciousHostKeywords": ["discord", "nitro", "premium"],
"isHostSimilarToKeywordDistanceThreshold": 2
},
"wolframAlphaAppId": "79J52T-6239TVXHR7"
"wolframAlphaAppId": "79J52T-6239TVXHR7",
"helpSystem": {
"stagingChannelPattern": "ask_here",
"overviewChannelPattern": "active_questions",
"categories": [
"Java",
"Frameworks",
"JavaFX|Swing",
"IDE",
"Build Tools",
"Database",
"Android",
"C|C++",
"Algorithms",
"Math",
"Architecture",
"Code Review",
"Together Java Bot",
"Other"
],
"categoryRoleSuffix": " - Helper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
import org.togetherjava.tjbot.commands.basic.RoleSelectCommand;
import org.togetherjava.tjbot.commands.basic.SuggestionsUpDownVoter;
import org.togetherjava.tjbot.commands.basic.VcActivityCommand;
import org.togetherjava.tjbot.commands.free.AutoFreeRoutine;
import org.togetherjava.tjbot.commands.free.FreeChannelMonitor;
import org.togetherjava.tjbot.commands.free.FreeCommand;
import org.togetherjava.tjbot.commands.help.*;
import org.togetherjava.tjbot.commands.mathcommands.TeXCommand;
import org.togetherjava.tjbot.commands.mathcommands.wolframalpha.WolframAlphaCommand;
import org.togetherjava.tjbot.commands.moderation.*;
Expand Down Expand Up @@ -62,7 +60,7 @@ public enum Features {
ModerationActionsStore actionsStore = new ModerationActionsStore(database);
ModAuditLogWriter modAuditLogWriter = new ModAuditLogWriter(config);
ScamHistoryStore scamHistoryStore = new ScamHistoryStore(database);
FreeChannelMonitor freeChannelMonitor = new FreeChannelMonitor(config);
HelpSystemHelper helpSystemHelper = new HelpSystemHelper(config);

// NOTE The system can add special system relevant commands also by itself,
// hence this list may not necessarily represent the full list of all commands actually
Expand All @@ -75,12 +73,13 @@ public enum Features {
features.add(new TopHelpersPurgeMessagesRoutine(database));
features.add(new RemindRoutine(database));
features.add(new ScamHistoryPurgeRoutine(scamHistoryStore));
features.add(new AutoFreeRoutine(freeChannelMonitor));
features.add(new BotMessageCleanup(config));

// Message receivers
features.add(new TopHelpersMessageListener(database, config));
features.add(new SuggestionsUpDownVoter(config));
features.add(new ScamBlocker(actionsStore, scamHistoryStore, config));
features.add(new ImplicitAskListener(config, helpSystemHelper));

// Event receivers
features.add(new RejoinModerationRoleListener(actionsStore, config));
Expand All @@ -107,9 +106,12 @@ public enum Features {
features.add(new UnquarantineCommand(actionsStore, config));
features.add(new WhoIsCommand());
features.add(new WolframAlphaCommand(config));
features.add(new AskCommand(config, helpSystemHelper));
features.add(new CloseCommand(helpSystemHelper));
features.add(new ChangeHelpCategoryCommand(config, helpSystemHelper));

// Mixtures
features.add(new FreeCommand(config, freeChannelMonitor));
features.add(new HelpThreadOverviewUpdater(config, helpSystemHelper));

return features;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
* the schedule defined by {@link #createSchedule()}.
*/
public interface Routine extends Feature {
/**
* Triggered by the core system on the schedule defined by {@link #createSchedule()}.
*
* @param jda the JDA instance the bot is operating with
*/
void runRoutine(@NotNull JDA jda);

/**
* Retrieves the schedule of this routine. Called by the core system once during the startup in
* order to execute the routine accordingly.
Expand All @@ -34,6 +27,13 @@ public interface Routine extends Feature {
@NotNull
Schedule createSchedule();

/**
* Triggered by the core system on the schedule defined by {@link #createSchedule()}.
*
* @param jda the JDA instance the bot is operating with
*/
void runRoutine(@NotNull JDA jda);

/**
* The schedule of routines.
*
Expand Down

This file was deleted.

This file was deleted.

Loading