I still have no idea
This commit is contained in:
parent
941ec1bf4d
commit
94336b2a3f
@ -7,6 +7,9 @@ package dev.salmonllama.fsbot.logging;
|
|||||||
|
|
||||||
import dev.salmonllama.fsbot.config.BotConfig;
|
import dev.salmonllama.fsbot.config.BotConfig;
|
||||||
import org.javacord.api.DiscordApi;
|
import org.javacord.api.DiscordApi;
|
||||||
|
import org.javacord.api.entity.message.embed.EmbedBuilder;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
public class Logger {
|
public class Logger {
|
||||||
|
|
||||||
@ -18,6 +21,10 @@ public class Logger {
|
|||||||
private final String BOT_LOG = BotConfig.BOT_LOG;
|
private final String BOT_LOG = BotConfig.BOT_LOG;
|
||||||
private final String SALMONLLAMA = BotConfig.BOT_OWNER;
|
private final String SALMONLLAMA = BotConfig.BOT_OWNER;
|
||||||
|
|
||||||
|
private EmbedBuilder reportEmbed;
|
||||||
|
|
||||||
|
private EmbedBuilder errorEmbed;
|
||||||
|
|
||||||
public Logger(DiscordApi api) {
|
public Logger(DiscordApi api) {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
}
|
}
|
||||||
@ -46,7 +53,7 @@ public class Logger {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logError() {
|
public void logError(String errorMsg) {
|
||||||
api.getServerTextChannelById(BOT_LOG).ifPresentOrElse(channel -> {
|
api.getServerTextChannelById(BOT_LOG).ifPresentOrElse(channel -> {
|
||||||
// Log the thing
|
// Log the thing
|
||||||
channel.sendMessage("error");
|
channel.sendMessage("error");
|
||||||
|
Loading…
Reference in New Issue
Block a user