Compare commits

..

No commits in common. "e396ce641757aef4733591851064d82a90862f8e" and "d9d0ce32362339d3d129fcf2350e60bc5c5ff87d" have entirely different histories.

4 changed files with 7 additions and 62 deletions

View File

@ -11,15 +11,16 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
public class Cache
public class Configuration
{
private static DatabaseManager dbManager = null;
private static boolean verbose = false;
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";
@ -97,14 +98,6 @@ public class Cache
*/
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.
*

View File

@ -67,9 +67,9 @@ public class BotInfoCommand
DecimalFormat ramMBFormatter = new DecimalFormat("#.##");
embedBuilder.addField("RAM Usage", ramMBFormatter.format(usedRamMB) + " MB", true);
// developer field
String developerMention = "<@" + Configuration.getBotMaintainerId() + ">";
embedBuilder.addField("Maintainer", developerMention, true);
// author field
String authorMention = "<@" + Configuration.getBotOwnerId() + ">";
embedBuilder.addField("Author", authorMention, true);
// uptime field
embedBuilder.addField("Uptime", FormatUtil.getNiceUptime(), true);

View File

@ -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;
}
}
}

View File

@ -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='