mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-05 17:51:27 +03:00
Linting
This commit is contained in:
@@ -4,9 +4,9 @@ let current_presence = -1;
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
*
|
||||
* @param {string} text
|
||||
* @param {string} [additional]
|
||||
*
|
||||
* @param {string} text
|
||||
* @param {string} [additional]
|
||||
* @returns {string}
|
||||
*/
|
||||
footer: (text, additional) => {
|
||||
@@ -20,16 +20,17 @@ module.exports = {
|
||||
selectPresence: () => {
|
||||
const length = config.presence.presences.length;
|
||||
if (length === 0) return {};
|
||||
|
||||
|
||||
let num;
|
||||
if (length === 1)
|
||||
if (length === 1) {
|
||||
num = 0;
|
||||
else if (config.presence.randomise)
|
||||
} else if (config.presence.randomise) {
|
||||
num = Math.floor(Math.random() * length);
|
||||
else {
|
||||
} else {
|
||||
current_presence = current_presence + 1; // ++ doesn't work on negative numbers
|
||||
if (current_presence === length)
|
||||
if (current_presence === length) {
|
||||
current_presence = 0;
|
||||
}
|
||||
num = current_presence;
|
||||
}
|
||||
|
||||
@@ -48,5 +49,5 @@ module.exports = {
|
||||
},
|
||||
status
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
@@ -25,7 +25,7 @@ module.exports = {
|
||||
W: '🇼',
|
||||
X: '🇽',
|
||||
Y: '🇾',
|
||||
Z: '🇿',
|
||||
Z: '🇿'
|
||||
},
|
||||
numbers: {
|
||||
0: '0️⃣',
|
||||
@@ -38,6 +38,6 @@ module.exports = {
|
||||
7: '7️⃣',
|
||||
8: '8️⃣',
|
||||
9: '9️⃣',
|
||||
10: '🔟',
|
||||
10: '🔟'
|
||||
}
|
||||
};
|
@@ -6,5 +6,5 @@ module.exports = {
|
||||
* @param {string} path - A path relative to the root of the project (like "./user/config.js")
|
||||
* @returns {string} absolute path
|
||||
*/
|
||||
path: path => join(__dirname, '../../', path),
|
||||
path: path => join(__dirname, '../../', path)
|
||||
};
|
@@ -1,10 +1,10 @@
|
||||
module.exports = {
|
||||
int2hex: (int) => int.toString(16).toUpperCase(),
|
||||
int2hex: int => int.toString(16).toUpperCase(),
|
||||
some: async (array, func) => {
|
||||
for (const element of array) {
|
||||
if (await func(element)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
wait: (time) => new Promise(res => setTimeout(res, time)),
|
||||
wait: time => new Promise(res => setTimeout(res, time))
|
||||
};
|
Reference in New Issue
Block a user