Search in sources :

Example 1 with SlashCtorInjectionTest

use of com.freya02.bot.wiki.ctorinj.commands.SlashCtorInjectionTest in project BotCommands by freya022.

the class CtorInjMain method alt2.

private static void alt2(JDA jda) throws IOException {
    // Just a test value
    Connection connection = null;
    CommandsBuilder.newBuilder().extensionsBuilder(extensionsBuilder -> extensionsBuilder.registerInstanceSupplier(SlashCtorInjectionTest.class, context -> new SlashCtorInjectionTest(context, connection))).build(jda, "com.freya02.bot.wiki.ctorinj.commands");
}
Also used : Config(com.freya02.bot.Config) CommandsBuilder(com.freya02.botcommands.api.CommandsBuilder) JDA(net.dv8tion.jda.api.JDA) Connection(java.sql.Connection) JDABuilder(net.dv8tion.jda.api.JDABuilder) IOException(java.io.IOException) SlashCtorInjectionTest(com.freya02.bot.wiki.ctorinj.commands.SlashCtorInjectionTest) Connection(java.sql.Connection) SlashCtorInjectionTest(com.freya02.bot.wiki.ctorinj.commands.SlashCtorInjectionTest)

Aggregations

Config (com.freya02.bot.Config)1 SlashCtorInjectionTest (com.freya02.bot.wiki.ctorinj.commands.SlashCtorInjectionTest)1 CommandsBuilder (com.freya02.botcommands.api.CommandsBuilder)1 IOException (java.io.IOException)1 Connection (java.sql.Connection)1 JDA (net.dv8tion.jda.api.JDA)1 JDABuilder (net.dv8tion.jda.api.JDABuilder)1