Skip to content

Commit 1630f13

Browse files
authoredNov 16, 2020
BAEL-4731 (article improvement) (eugenp#10251)
* Instead of using .onDisconnect().block() to keep the app alive, make the app a web server. * Add article reference to README
1 parent 59978e8 commit 1630f13

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed
 

‎discord4j/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
README.md
21
target/
32
!.mvn/wrapper/maven-wrapper.jar
43
!**/src/main/**/target/

‎discord4j/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## DISCORD4J
2+
3+
This module contains articles about Discord4J
4+
5+
### Relevant Articles:
6+
7+
- [Creating a Discord Bot with Discord4J + Spring Boot](https://www.baeldung.com/spring-discord4j-bot)

‎discord4j/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
<groupId>org.springframework.boot</groupId>
2424
<artifactId>spring-boot-starter</artifactId>
2525
</dependency>
26+
<dependency>
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-starter-webflux</artifactId>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-starter-actuator</artifactId>
33+
</dependency>
2634

2735
<dependency>
2836
<groupId>org.springframework.boot</groupId>

‎discord4j/src/main/java/com/baeldung/discordbot/BotConfiguration.java

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public <T extends Event> GatewayDiscordClient gatewayDiscordClient(List<EventLis
3636
.onErrorResume(listener::handleError)
3737
.subscribe();
3838
}
39-
40-
client.onDisconnect().block();
4139
}
4240
catch ( Exception exception ) {
4341
log.error( "Be sure to use a valid bot token!", exception );

0 commit comments

Comments
 (0)
Please sign in to comment.