completing merge

milan
Shwoomple 2022-02-21 00:00:42 +05:30
commit 01d023a2bf
1 changed files with 4 additions and 1 deletions

View File

@ -4,11 +4,14 @@ import org.javacord.api.DiscordApi;
import org.javacord.api.DiscordApiBuilder;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Date;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
String startupTime = String.format("%1$tY-%1$tm-%1$td %1$tI:%1$tM:%1$tS%1$tp UTC%1$tz", new Date());
// Insert your bot's token here
String token = args[0];
@ -23,7 +26,7 @@ public class Main {
// Add a listener which answers with "Pong!" if someone writes "!ping"
api.addMessageCreateListener(event -> {
if (event.getMessageContent().equalsIgnoreCase("!ping")) {
event.getChannel().sendMessage("Pong!");
event.getChannel().sendMessage("Pong!\nHacky the quiz bot has been running since "+startupTime);
}
});