Skip to content

Commit

Permalink
bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jsinco committed Nov 30, 2024
1 parent c787136 commit cd6178e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/dev/jsinco/discord/framework/FrameWork.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static void reflectivelyRegisterClasses() {

try {
Constructor<?> constructor = aClass.getConstructor();
if (Modifier.isPrivate(constructor.getModifiers())) {
if (Modifier.isPrivate(constructor.getModifiers()) || Modifier.isAbstract(aClass.getModifiers())) {
continue;
}
Object instance = constructor.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import dev.jsinco.discord.framework.FrameWork;
import dev.jsinco.discord.framework.scheduling.Tickable;
import dev.jsinco.discord.framework.settings.Settings;
import dev.jsinco.discord.framework.util.DNI;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.entities.Guild;
Expand All @@ -31,6 +32,7 @@
* @see CommandModule
* @see DiscordCommand
*/
@DNI
public class CommandManager extends Tickable {

private static final Map<String, CommandModule> COMMAND_MODULE_MAP = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import dev.jsinco.discord.framework.commands.DiscordCommand;
import dev.jsinco.discord.framework.events.EventManager;
import dev.jsinco.discord.framework.events.ListenerModuleState;
import dev.jsinco.discord.framework.util.DNI;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.commands.Command;
Expand All @@ -12,6 +13,7 @@

import java.util.List;

@DNI
@DiscordCommand(name = "addevent", description = "Add a class as an event listener.", permission = Permission.ADMINISTRATOR)
public class AddEventListenerEmbeddedCommand implements CommandModule {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import dev.jsinco.discord.framework.commands.DiscordCommand;
import dev.jsinco.discord.framework.events.EventManager;
import dev.jsinco.discord.framework.events.ListenerModuleState;
import dev.jsinco.discord.framework.util.DNI;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.commands.Command;
Expand All @@ -12,6 +13,7 @@

import java.util.List;

@DNI
@DiscordCommand(name = "removeevent", description = "Remove a class as an event listener.", permission = Permission.ADMINISTRATOR)
public class RemoveEventListenerEmbeddedCommand implements CommandModule {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class Settings extends AbstractOkaeriConfig {
private boolean sendErrors = false;

@Comment("Remote Github repository for this project for enhanced error reporting. (Should include '/' at the end)")
private String repository = "https://github.com/Jsinco/jda=framework/";
private String repository = "https://github.com/Jsinco/jda-framework/";

@Comment("Branch of the remote Github repository for this project for enhanced error reporting.")
private String branch = "master";
Expand Down

0 comments on commit cd6178e

Please sign in to comment.