Organize a lot of utils
This commit is contained in:
@@ -70,4 +70,22 @@ function listAccentsCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getAccentFromParams(params) {
|
||||
if(isNaN(params)) {
|
||||
for(let i in getGlobalConfig().accents) {
|
||||
if(toLowerCase(getGlobalConfig().accents[i]).indexOf(toLowerCase(params)) != -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGlobalConfig().accents[params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user