mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Чистим чистим
This commit is contained in:
parent
fc4506b908
commit
f59f6ef4d7
2 changed files with 8 additions and 8 deletions
12
base/JaBa.js
12
base/JaBa.js
|
@ -112,13 +112,12 @@ class JaBa extends Client {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async loadCommands(dir) {
|
async loadCommands(dir) {
|
||||||
const filePath = path.join(__dirname, dir);
|
const rest = new REST().setToken(this.config.token),
|
||||||
let folders = await fs.readdir(filePath);
|
filePath = path.join(__dirname, dir),
|
||||||
folders = folders
|
folders = (await fs.readdir(filePath))
|
||||||
.map(file => path.join(filePath, file))
|
.map(file => path.join(filePath, file))
|
||||||
.filter(async path => { path = await fs.lstat(path); path.isDirectory(); });
|
.filter(async path => (await fs.lstat(path)).isDirectory());
|
||||||
|
|
||||||
const rest = new REST().setToken(this.config.token);
|
|
||||||
const commands = [];
|
const commands = [];
|
||||||
for (let index = 0; index < folders.length; index++) {
|
for (let index = 0; index < folders.length; index++) {
|
||||||
const folder = folders[index];
|
const folder = folders[index];
|
||||||
|
@ -234,6 +233,7 @@ class JaBa extends Client {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get default language
|
* Get default language
|
||||||
|
* @returns {String} Default bot's language
|
||||||
*/
|
*/
|
||||||
get defaultLanguage() {
|
get defaultLanguage() {
|
||||||
return this.languages.find(language => language.default).name;
|
return this.languages.find(language => language.default).name;
|
||||||
|
@ -253,7 +253,7 @@ class JaBa extends Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns beautified date
|
* Beautify date
|
||||||
* @param {Date} date Date
|
* @param {Date} date Date
|
||||||
* @param {String | null} format Format for moment
|
* @param {String | null} format Format for moment
|
||||||
* @param {String} locale Language
|
* @param {String} locale Language
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Selectroles extends BaseCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: interaction.translate("administration/selectroles:ROLES_UPDATED", null, { ephemeral: true }),
|
content: interaction.translate("administration/selectroles:ROLES_UPDATED"),
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue