Skip to content

Commit cc2f84c

Browse files
committed
Reduced the complexity.
Should be alot better now...
1 parent 5817d0b commit cc2f84c

File tree

11 files changed

+10
-695
lines changed

11 files changed

+10
-695
lines changed

src/main/java/org/mangorage/mangobotgithub/MangoBotGithub.java

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,21 @@
66
import org.mangorage.commonutils.config.ISetting;
77
import org.mangorage.mangobotcore.plugin.api.MangoBotPlugin;
88
import org.mangorage.mangobotcore.plugin.api.Plugin;
9-
import org.mangorage.mangobotcore.plugin.api.PluginManager;
10-
import org.mangorage.mangobotgithub.core.GHIssueStatus;
11-
import org.mangorage.mangobotgithub.core.GHPRStatus;
12-
import org.mangorage.mangobotgithub.core.GuildConfig;
13-
import org.mangorage.mangobotgithub.core.IssueScanCommand;
14-
import org.mangorage.mangobotgithub.core.PRScanCommand;
159
import org.mangorage.mangobotgithub.core.PasteRequestModule;
16-
import org.mangorage.mangobotplugin.entrypoint.MangoBot;
1710

1811
import java.nio.file.Path;
12+
import java.util.UUID;
1913

2014
@MangoBotPlugin(id = MangoBotGithub.ID)
2115
public final class MangoBotGithub implements Plugin {
2216
public static final String ID = "mangobotgithub";
2317

24-
25-
// Where we create our "config"
2618
public final static Config CONFIG = new Config(Path.of("plugins/%s/.env".formatted(MangoBotGithub.ID)));
27-
2819
public static final ISetting<String> GITHUB_TOKEN = ConfigSetting.create(CONFIG, "PASTE_TOKEN", "empty");
29-
public static final ISetting<String> GITHUB_USERNAME = ConfigSetting.create(CONFIG, "GITHUB_USERNAME", "RealMangoRage");
30-
20+
public static final ISetting<String> MANGOBOT_UPLOAD_TOKEN = ConfigSetting.create(CONFIG, "MANGOBOT_UPLOAD_TOKEN", UUID.randomUUID().toString()); // Generates one by default.
3121

3222
public MangoBotGithub() {
33-
PasteRequestModule.register();
23+
3424
}
3525

3626

@@ -41,13 +31,6 @@ public String getId() {
4131

4232
@Override
4333
public void load() {
44-
GuildConfig.loadServerConfigs();
45-
46-
var parent = PluginManager.getInstance().getPlugin("mangobot").getInstance(MangoBot.class);
47-
var cmdRegistry = parent.getCommandManager();
48-
cmdRegistry.register(new PRScanCommand(parent));
49-
cmdRegistry.register(new IssueScanCommand(parent));
50-
new GHPRStatus(parent);
51-
new GHIssueStatus(parent);
34+
PasteRequestModule.register();
5235
}
5336
}

src/main/java/org/mangorage/mangobotgithub/core/GHIssueStatus.java

Lines changed: 0 additions & 141 deletions
This file was deleted.

src/main/java/org/mangorage/mangobotgithub/core/GHPRStatus.java

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)