Merge branch 'master' of https://git.nevets.tech/Steven/ModBot
This commit is contained in:
		
						commit
						c2fcc1cee0
					
				@ -22,7 +22,7 @@ public class CoreBot {
 | 
				
			|||||||
    private static final Logger LOGGER = LoggerFactory.getLogger(CoreBot.class);
 | 
					    private static final Logger LOGGER = LoggerFactory.getLogger(CoreBot.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void main(String[] args) {
 | 
					    public static void main(String[] args) {
 | 
				
			||||||
        setLoggingLevel(Level.DEBUG);
 | 
					        setLoggingLevel(Level.INFO);
 | 
				
			||||||
        CORE_CONFIG.addDefaults(getDefaults());
 | 
					        CORE_CONFIG.addDefaults(getDefaults());
 | 
				
			||||||
        CORE_CONFIG.loadConfig();
 | 
					        CORE_CONFIG.loadConfig();
 | 
				
			||||||
        modules = ModuleLoader.loadModules();
 | 
					        modules = ModuleLoader.loadModules();
 | 
				
			||||||
@ -59,7 +59,6 @@ public class CoreBot {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    private static Map<String, Object> getDefaults() {
 | 
					    private static Map<String, Object> getDefaults() {
 | 
				
			||||||
        Map<String, Object> defaults = new HashMap<>();
 | 
					        Map<String, Object> defaults = new HashMap<>();
 | 
				
			||||||
        defaults.put("bot.token", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
 | 
					        defaults.put("bot.token", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
 | 
				
			||||||
@ -68,8 +67,8 @@ public class CoreBot {
 | 
				
			|||||||
        return defaults;
 | 
					        return defaults;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void setLoggingLevel(ch.qos.logback.classic.Level level) {
 | 
					    public static void setLoggingLevel(Level level) {
 | 
				
			||||||
        ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
 | 
					        ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
 | 
				
			||||||
        root.setLevel(level);
 | 
					        root.setLevel(level);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,9 @@ package tech.nevets.modbot.api;
 | 
				
			|||||||
import net.dv8tion.jda.api.JDA;
 | 
					import net.dv8tion.jda.api.JDA;
 | 
				
			||||||
import tech.nevets.modbot.api.commands.CommandRegistry;
 | 
					import tech.nevets.modbot.api.commands.CommandRegistry;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public interface BotModule {
 | 
					public interface BotModule {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    default void onPreEnable() {}
 | 
					    default void onPreEnable() {}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user