Discord
The Discord notifier adds support to route messages to Discord using webhooks.
Creating a Discord Webhook
Follow the instructions on the Discord website to create a webhook.
Dependency
- build.gradle.kts
- build.gradle
- pom.xml
dependencies {
testImplementation("nl.vanwollingen.alerticorn:alerticorn-discord-notifier:0.1") //To use Discord
}
dependencies {
testImplementation 'nl.vanwollingen.alerticorn:alerticorn-discord-notifier:0.1'
}
<dependency>
<groupId>nl.vanwollingen.alerticorn</groupId>
<artifactId>alerticorn-discord-notifier</artifactId>
<version>0.1</version>
<scope>test</scope>
</dependency>
Shorthand Annotation
@Discord
can be used as a shorthand for @Message.Platform("discord")
Example of using @Discord
@Discord
@Message(title = "This would go to Discord")
@Test
fun test() {
//...
}
Configuration
Configure environment variables with AC_DISCORD_CHANNEL_<your channel name>
to hold the channel webhooks.