Compare commits
No commits in common. "e396ce641757aef4733591851064d82a90862f8e" and "d9d0ce32362339d3d129fcf2350e60bc5c5ff87d" have entirely different histories.
e396ce6417
...
d9d0ce3236
@ -11,15 +11,16 @@ import java.util.ArrayList;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Cache
|
public class Configuration
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
private static DatabaseManager dbManager = null;
|
private static DatabaseManager dbManager = null;
|
||||||
private static boolean verbose = false;
|
private static boolean verbose = false;
|
||||||
private static MessageLogger verbosityLogger;
|
private static MessageLogger verbosityLogger;
|
||||||
private static final long botMaintainerId = 979809420714332260L;
|
|
||||||
private static long botOwnerId = 0L;
|
// todo: allow people to set their own user id
|
||||||
|
private static final long botOwnerId = 979809420714332260L;
|
||||||
|
|
||||||
private final static String expiryTimestampFormat = "yy/MM/dd HH:mm:ss";
|
private final static String expiryTimestampFormat = "yy/MM/dd HH:mm:ss";
|
||||||
|
|
||||||
@ -97,14 +98,6 @@ public class Cache
|
|||||||
*/
|
*/
|
||||||
public static long getBotOwnerId() { return botOwnerId; }
|
public static long getBotOwnerId() { return botOwnerId; }
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the bot maintainer's profile id.
|
|
||||||
*
|
|
||||||
* @return a long of the account's id
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static long getBotMaintainerId() { return botMaintainerId; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the bot's application id.
|
* Set the bot's application id.
|
||||||
*
|
*
|
@ -67,9 +67,9 @@ public class BotInfoCommand
|
|||||||
DecimalFormat ramMBFormatter = new DecimalFormat("#.##");
|
DecimalFormat ramMBFormatter = new DecimalFormat("#.##");
|
||||||
embedBuilder.addField("RAM Usage", ramMBFormatter.format(usedRamMB) + " MB", true);
|
embedBuilder.addField("RAM Usage", ramMBFormatter.format(usedRamMB) + " MB", true);
|
||||||
|
|
||||||
// developer field
|
// author field
|
||||||
String developerMention = "<@" + Configuration.getBotMaintainerId() + ">";
|
String authorMention = "<@" + Configuration.getBotOwnerId() + ">";
|
||||||
embedBuilder.addField("Maintainer", developerMention, true);
|
embedBuilder.addField("Author", authorMention, true);
|
||||||
|
|
||||||
// uptime field
|
// uptime field
|
||||||
embedBuilder.addField("Uptime", FormatUtil.getNiceUptime(), true);
|
embedBuilder.addField("Uptime", FormatUtil.getNiceUptime(), true);
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
package wtf.beatrice.hidekobot.utils;
|
|
||||||
|
|
||||||
import org.yaml.snakeyaml.Yaml;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ConfigurationUtil
|
|
||||||
{
|
|
||||||
private final String configFilePath;
|
|
||||||
|
|
||||||
public ConfigurationUtil(String configFilePath)
|
|
||||||
{
|
|
||||||
this.configFilePath = configFilePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initConfig()
|
|
||||||
{
|
|
||||||
Yaml internalConfigYaml = new Yaml();
|
|
||||||
Map<String, Object> internalConfigContents = null;
|
|
||||||
|
|
||||||
try (InputStream internalConfigStream = getClass()
|
|
||||||
.getClassLoader()
|
|
||||||
.getResourceAsStream("config.yml"))
|
|
||||||
{
|
|
||||||
internalConfigContents = internalConfigYaml.load(internalConfigStream);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(internalConfigContents == null) // todo error handling
|
|
||||||
{
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
bot-settings:
|
|
||||||
bot-token: 'paste-token-here'
|
|
||||||
bot-owner-id: 'paste_your_user_id_here'
|
|
||||||
bot-color: 'PINK'
|
|
||||||
system-settings:
|
|
||||||
heartbeat:
|
|
||||||
enabled: false
|
|
||||||
link: 'https://your-heartbeat-api.com/api/push/apikey?status=up&msg=OK&ping='
|
|
Loading…
Reference in New Issue
Block a user