initial commit
This commit is contained in:
6
bots/ping-bot/build.gradle.kts
Normal file
6
bots/ping-bot/build.gradle.kts
Normal file
@@ -0,0 +1,6 @@
|
||||
plugins {
|
||||
id("chat-bot.bot-conventions")
|
||||
}
|
||||
|
||||
group = "eu.jonahbauer.chat.bots"
|
||||
version = "0.1.0-SNAPSHOT"
|
@@ -0,0 +1,19 @@
|
||||
package eu.jonahbauer.chat.bot.ping;
|
||||
|
||||
import eu.jonahbauer.chat.bot.api.ChatBot;
|
||||
import eu.jonahbauer.chat.bot.api.Message;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PingBot extends ChatBot {
|
||||
|
||||
public PingBot() {
|
||||
super("Ping");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMessage(Message.@NotNull Post message) {
|
||||
if (message.message().equals("!ping")) {
|
||||
post("pong");
|
||||
}
|
||||
}
|
||||
}
|
10
bots/ping-bot/src/main/java/module-info.java
Normal file
10
bots/ping-bot/src/main/java/module-info.java
Normal file
@@ -0,0 +1,10 @@
|
||||
import eu.jonahbauer.chat.bot.api.ChatBot;
|
||||
import eu.jonahbauer.chat.bot.ping.PingBot;
|
||||
|
||||
module eu.jonahbauer.chat.bot.ping {
|
||||
requires eu.jonahbauer.chat.bot.api;
|
||||
requires org.apache.logging.log4j;
|
||||
requires static lombok;
|
||||
|
||||
provides ChatBot with PingBot;
|
||||
}
|
Reference in New Issue
Block a user