-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
319 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# User-specific stuff | ||
.idea/ | ||
|
||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
target/ | ||
|
||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
|
||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
.mvn/wrapper/maven-wrapper.jar | ||
.flattened-pom.xml | ||
|
||
# Common working directory | ||
run/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package niix.dan.consolediscord; | ||
|
||
import java.util.List; | ||
|
||
public enum ConfigEnum { | ||
DISCORD_BOT_TOKEN("BotToken", "Discord-Bot.Token", "Token para a aplicação Discord", "string"), | ||
DISCORD_BOT_CHANNEL("BotChannel", "Discord-Bot.Channel", "Canal Discord associado ao bot", "string"), | ||
|
||
BLOCKED_CMDS("BlockedCmds", "Discord-Bot.BlockedCmds", "Comandos bloqueados que não podem ser usados no console", "list"), | ||
WHITELIST_ENABLED("Whitelist_Enabled", "Discord-Bot.Whitelist.Enabled", "Indica se a lista de pessoas permitidas está ativada", "boolean"), | ||
WHITELIST_LIST("Whitelist_List", "Discord-Bot.Whitelist.List", "Lista de IDs Discord permitidos na lista de permissões", "list"), | ||
WHITELIST_MESSAGE("Whitelist_Message", "Discord-Bot.Whitelist.Message", "Mensagem exibida para usuários não autorizados", "string"), | ||
|
||
DISCORD_MESSAGE_LIMIT("Msg_MessageLimit", "Messages.Discord.MessageLimit", "Mensagem exibida quando uma mensagem excede o limite do Discord", "string"), | ||
IN_GAME_NO_PERMISSION("Msg_NoPerm", "Messages.InGame.NoPerm", "Mensagem exibida quando o jogador não tem permissão", "string"), | ||
|
||
IGNORE_WORDS("IgnoreWords", "Config.IgnoreWords", "Palavras que, se encontradas nos logs, serão ignoradas", "list"), | ||
|
||
LOG_DELAY("UpdateDelay", "Config.LogDelay", "Atraso entre verificações de logs do console para enviar para o Discord (em ticks)", "long"), | ||
|
||
FILTER_ENABLED("EnableFilter", "Config.Filter.Enabled", "Indica se o filtro de comandos do Discord está habilitado", "boolean"), | ||
FILTER_REGEX("FilterRegex", "Config.Filter.RegEx", "Expressão regular usada para filtrar comandos do Discord", "string"), | ||
FILTER_REPLACE("FilterReplace", "Config.Filter.Replace", "Texto de substituição para comandos filtrados do Discord", "string"); | ||
|
||
private final String key; | ||
private final String description; | ||
private final String type; | ||
private final String name; | ||
|
||
ConfigEnum(String name, String key, String description, String type) { | ||
this.name = name; | ||
this.key = key; | ||
this.type = type; | ||
this.description = description; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
/** | ||
* Método de parse para encontrar um ConfigKey com base no caminho da configuração. | ||
* | ||
* @param path O caminho da configuração a ser procurado | ||
* @return O ConfigKey correspondente ao caminho, ou null se não encontrado | ||
*/ | ||
public static ConfigEnum parse(String path) { | ||
for (ConfigEnum configKey : values()) { | ||
if (configKey.getKey().equals(path)) { | ||
return configKey; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.