MCPcopy Create free account
hub / github.com/Java-Discord/JavaBot / main

Method main

src/main/java/net/discordjug/javabot/Bot.java:102–106  ·  view source on GitHub ↗

The main method that starts the bot. This involves a few steps: Setting the time zone to UTC, to keep our sanity when working with times. Loading the configuration JSON file. Creating and configuring the net.dv8tion.jda.api.JDA instance that enables the

(String[] args)

Source from the content-addressed store, hash-verified

100 * @throws Exception If any exception occurs during bot creation.
101 */
102 public static void main(String[] args) throws Exception {
103 TimeZone.setDefault(TimeZone.getTimeZone(ZoneOffset.UTC));
104 MessageRequest.setDefaultMentions(EnumSet.of(Message.MentionType.CHANNEL, Message.MentionType.USER, Message.MentionType.EMOJI));
105 SpringApplication.run(Bot.class, args);
106 }
107
108 private void registerComponentHandlers(@NotNull ApplicationContext ctx) {
109 Map<String, Object> interactionHandlers = ctx.getBeansWithAnnotation(AutoDetectableComponentHandler.class);

Callers

nothing calls this directly

Calls 1

ofMethod · 0.45

Tested by

no test coverage detected