Initializes Sentry, interactions and listeners.
(ApplicationReadyEvent event)
| 69 | * Initializes Sentry, interactions and listeners. |
| 70 | */ |
| 71 | @Override |
| 72 | public void onApplicationEvent(ApplicationReadyEvent event) { |
| 73 | Sentry.init(options -> { |
| 74 | options.setDsn(config.getSystems().getSentryDsn()); |
| 75 | options.setTracesSampleRate(1.0); |
| 76 | options.setDebug(false); |
| 77 | }); |
| 78 | if (!commands.isEmpty()) { |
| 79 | dih4jda.addSlashCommands(commands.toArray(SlashCommand[]::new)); |
| 80 | } |
| 81 | if (!contextCommands.isEmpty()) { |
| 82 | dih4jda.addContextCommands(contextCommands.toArray(ContextCommand[]::new)); |
| 83 | } |
| 84 | dih4jda.registerInteractions(); |
| 85 | addEventListeners(listeners); |
| 86 | registerComponentHandlers(ctx); |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * The main method that starts the bot. This involves a few steps: |
nothing calls this directly
no test coverage detected