mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-23 13:44:59 +05:00
clean up
This commit is contained in:
parent
e5c6659de5
commit
b11cf4ce11
5 changed files with 24 additions and 24 deletions
|
@ -1,4 +1,5 @@
|
|||
// Thanks Stackoverflow <3
|
||||
|
||||
function setDaysTimeout(callback, days) {
|
||||
// 86400 seconds in a day
|
||||
const msInDay = 86400 * 1000;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
const { Message, BaseInteraction, User, GuildMember } = require("discord.js");
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Message|BaseInteraction} context
|
||||
* @returns {string} Locale
|
||||
* @returns {string} Guild's language
|
||||
*/
|
||||
function getLocale(context) {
|
||||
return context.data?.guild?.language;
|
||||
|
@ -30,7 +29,7 @@ function translate(client, key, args, locale) {
|
|||
* @param {import("../base/Client")} client
|
||||
* @param {string} prefixEmoji
|
||||
* @param {string} message
|
||||
* @returns {string} Localized message
|
||||
* @returns {string} Formatted message
|
||||
*/
|
||||
function formatReply(client, prefixEmoji, message) {
|
||||
return prefixEmoji ? `${client.customEmojis[prefixEmoji]} | ${message}` : message;
|
||||
|
|
|
@ -66,7 +66,7 @@ module.exports = {
|
|||
* @returns {number} A random integer between min and max.
|
||||
*/
|
||||
randomNum(min = 0, max = 100) {
|
||||
min = Math.ceil(min);
|
||||
min = Math.floor(min);
|
||||
max = Math.floor(max);
|
||||
|
||||
return Math.floor(Math.random() * (max - min + 1) + min);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"@discord-player/extractor": "^4.5.1",
|
||||
"@discordjs/opus": "^0.9.0",
|
||||
"@discordjs/rest": "^2.4.0",
|
||||
"@discordjs/voice": "^0.17.0",
|
||||
"@discordjs/voice": "^0.18.0",
|
||||
"@napi-rs/canvas": "^0.1.62",
|
||||
"chalk": "^4.1.2",
|
||||
"cron": "^3.2.1",
|
||||
|
@ -21,11 +21,11 @@
|
|||
"discord-player-youtubei": "1.3.5",
|
||||
"discord.js": "^14.16.3",
|
||||
"gamedig": "^5.1.4",
|
||||
"i18next": "^23.16.5",
|
||||
"i18next": "^23.16.6",
|
||||
"i18next-fs-backend": "^2.3.2",
|
||||
"md5": "^2.3.0",
|
||||
"moment": "^2.29.4",
|
||||
"mongoose": "^8.8.1",
|
||||
"mongoose": "^8.8.2",
|
||||
"ms": "^2.1.3",
|
||||
"node-fetch": "^2.7.0"
|
||||
},
|
||||
|
|
|
@ -18,8 +18,8 @@ importers:
|
|||
specifier: ^2.4.0
|
||||
version: 2.4.0
|
||||
'@discordjs/voice':
|
||||
specifier: ^0.17.0
|
||||
version: 0.17.0(@discordjs/opus@0.9.0)
|
||||
specifier: ^0.18.0
|
||||
version: 0.18.0(@discordjs/opus@0.9.0)
|
||||
'@napi-rs/canvas':
|
||||
specifier: ^0.1.62
|
||||
version: 0.1.62
|
||||
|
@ -48,8 +48,8 @@ importers:
|
|||
specifier: ^5.1.4
|
||||
version: 5.1.4
|
||||
i18next:
|
||||
specifier: ^23.16.5
|
||||
version: 23.16.5
|
||||
specifier: ^23.16.6
|
||||
version: 23.16.6
|
||||
i18next-fs-backend:
|
||||
specifier: ^2.3.2
|
||||
version: 2.3.2
|
||||
|
@ -60,8 +60,8 @@ importers:
|
|||
specifier: ^2.29.4
|
||||
version: 2.30.1
|
||||
mongoose:
|
||||
specifier: ^8.8.1
|
||||
version: 8.8.1(socks@2.8.3)
|
||||
specifier: ^8.8.2
|
||||
version: 8.8.2(socks@2.8.3)
|
||||
ms:
|
||||
specifier: ^2.1.3
|
||||
version: 2.1.3
|
||||
|
@ -129,9 +129,9 @@ packages:
|
|||
resolution: {integrity: sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@discordjs/voice@0.17.0':
|
||||
resolution: {integrity: sha512-hArn9FF5ZYi1IkxdJEVnJi+OxlwLV0NJYWpKXsmNOojtGtAZHxmsELA+MZlu2KW1F/K1/nt7lFOfcMXNYweq9w==}
|
||||
engines: {node: '>=16.11.0'}
|
||||
'@discordjs/voice@0.18.0':
|
||||
resolution: {integrity: sha512-BvX6+VJE5/vhD9azV9vrZEt9hL1G+GlOdsQaVl5iv9n87fkXjf3cSwllhR3GdaUC8m6dqT8umXIWtn3yCu4afg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@discordjs/ws@1.1.1':
|
||||
resolution: {integrity: sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==}
|
||||
|
@ -682,8 +682,8 @@ packages:
|
|||
i18next-fs-backend@2.3.2:
|
||||
resolution: {integrity: sha512-LIwUlkqDZnUI8lnUxBnEj8K/FrHQTT/Sc+1rvDm9E8YvvY5YxzoEAASNx+W5M9DfD5s77lI5vSAFWeTp26B/3Q==}
|
||||
|
||||
i18next@23.16.5:
|
||||
resolution: {integrity: sha512-KTlhE3EP9x6pPTAW7dy0WKIhoCpfOGhRQlO+jttQLgzVaoOjWwBWramu7Pp0i+8wDNduuzXfe3kkVbzrKyrbTA==}
|
||||
i18next@23.16.6:
|
||||
resolution: {integrity: sha512-wGdE5rUfkZtrL5k6MCptxbpjmgwku4rBRVU/YOJ7Xfd841fgaZjlxHpVJ5NIz8sfSvAJhEhJrvJ8qE7AWXE4Xg==}
|
||||
|
||||
iconv-lite@0.6.3:
|
||||
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
|
||||
|
@ -883,8 +883,8 @@ packages:
|
|||
socks:
|
||||
optional: true
|
||||
|
||||
mongoose@8.8.1:
|
||||
resolution: {integrity: sha512-l7DgeY1szT98+EKU8GYnga5WnyatAu+kOQ2VlVX1Mxif6A0Umt0YkSiksCiyGxzx8SPhGe9a53ND1GD4yVDrPA==}
|
||||
mongoose@8.8.2:
|
||||
resolution: {integrity: sha512-jCTSqDANfRzk909v4YoZQi7jlGRB2MTvgG+spVBc/BA4tOs1oWJr//V6yYujqNq9UybpOtsSfBqxI0dSOEFJHQ==}
|
||||
engines: {node: '>=16.20.1'}
|
||||
|
||||
mpath@0.9.0:
|
||||
|
@ -1386,10 +1386,10 @@ snapshots:
|
|||
|
||||
'@discordjs/util@1.1.1': {}
|
||||
|
||||
'@discordjs/voice@0.17.0(@discordjs/opus@0.9.0)':
|
||||
'@discordjs/voice@0.18.0(@discordjs/opus@0.9.0)':
|
||||
dependencies:
|
||||
'@types/ws': 8.5.12
|
||||
discord-api-types: 0.37.83
|
||||
discord-api-types: 0.37.105
|
||||
prism-media: 1.3.5(@discordjs/opus@0.9.0)
|
||||
tslib: 2.7.0
|
||||
ws: 8.18.0
|
||||
|
@ -2025,7 +2025,7 @@ snapshots:
|
|||
|
||||
i18next-fs-backend@2.3.2: {}
|
||||
|
||||
i18next@23.16.5:
|
||||
i18next@23.16.6:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.25.6
|
||||
|
||||
|
@ -2182,7 +2182,7 @@ snapshots:
|
|||
optionalDependencies:
|
||||
socks: 2.8.3
|
||||
|
||||
mongoose@8.8.1(socks@2.8.3):
|
||||
mongoose@8.8.2(socks@2.8.3):
|
||||
dependencies:
|
||||
bson: 6.9.0
|
||||
kareem: 2.6.3
|
||||
|
|
Loading…
Reference in a new issue