forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.7 KiB
43 lines
1.7 KiB
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . |
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· |
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ |
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ |
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ |
|
// Magicbane Emulator Project © 2013 - 2022 |
|
// www.magicbane.com |
|
|
|
package discord; |
|
|
|
import engine.gameManager.ConfigManager; |
|
import net.dv8tion.jda.api.entities.TextChannel; |
|
|
|
public enum ChatChannel { |
|
|
|
ANNOUNCE("MB_MAGICBOT_ANNOUNCE"), |
|
SEPTIC("MB_MAGICBOT_SEPTIC"), |
|
CHANGELOG("MB_MAGICBOT_CHANGELOG"), |
|
POLITICAL("MB_MAGICBOT_POLITICAL"), |
|
GENERAL("MB_MAGICBOT_GENERAL"), |
|
FORTOFIX("MB_MAGICBOT_FORTOFIX"), |
|
RECRUIT("MB_MAGICBOT_RECRUIT"), |
|
MAGICBOX("MB_MAGICBOT_MAGICBOX"), |
|
ADMINLOG("MB_MAGICBOT_ADMINLOG"); |
|
|
|
public final String configName; |
|
public long channelID; |
|
public TextChannel textChannel; |
|
|
|
ChatChannel(String configName) { |
|
this.configName = configName; |
|
} |
|
|
|
// Create text channel objects we will use |
|
|
|
public static void Init() { |
|
|
|
for (ChatChannel chatChannel : ChatChannel.values()) { |
|
chatChannel.channelID = Long.parseLong(ConfigManager.valueOf(chatChannel.configName).getValue()); |
|
chatChannel.textChannel = MagicBot.jda.getTextChannelById(chatChannel.channelID); |
|
} |
|
} |
|
}
|
|
|