Skip to content

Commit

Permalink
subscribe guild listener on event dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Nov 21, 2023
1 parent 82609ba commit e7d4638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/vc/listeners/GuildListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public GuildListener(final GatewayDiscordClient client,
final LiveFeedManager liveFeedManager) {
this.guildConfigManager = guildConfigManager;
this.liveFeedManager = liveFeedManager;
client.on(GuildCreateEvent.class, this::handle).subscribe();

client.getEventDispatcher().on(GuildCreateEvent.class, this::handle).subscribe();
restClient.getGuilds().collectList().subscribe(guilds -> {
LOGGER.info("Connected to {} guilds", guilds.size());
LOGGER.info("Connected to guilds: {}", guilds.stream()
Expand Down

0 comments on commit e7d4638

Please sign in to comment.