levix-bot 4.9.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -3
- package/SETUP.md +63 -7
- package/app.cjs +159 -46
- package/deploy/install.sh +10 -5
- package/package.json +9 -6
- package/public/dashboard/assets/40af6d88b63079a0-BZ8ojJNu.woff2 +0 -0
- package/public/dashboard/assets/481acf6760031cee-BypgxfGb.woff2 +0 -0
- package/public/dashboard/assets/6d3351fc535f8ef3-D2-eand5.woff2 +0 -0
- package/public/dashboard/assets/8ab0af53a3bda9d3-CyCXRvzh.woff2 +0 -0
- package/public/dashboard/assets/8f262393e9249e61-TQp-UTiE.woff2 +0 -0
- package/public/dashboard/assets/94d65887a83f1282-DmpS2jIq.woff2 +0 -0
- package/public/dashboard/assets/99e400330f36ae77-D3oMJlXt.woff2 +0 -0
- package/public/dashboard/assets/9d1f41b13e519d90-BVNSOH3d.woff2 +0 -0
- package/public/dashboard/assets/a005256cb957ecc7-CoYeBiSI.woff2 +0 -0
- package/public/dashboard/assets/b19c2080652a3c2b-DIC32ArD.woff2 +0 -0
- package/public/dashboard/assets/c4064400db3750ce-BehTv68k.woff2 +0 -0
- package/public/dashboard/assets/c69d345fa1068c2d-CmI34b-g.woff2 +0 -0
- package/public/dashboard/assets/cc27b30471250057-6fWv1k7M.woff2 +0 -0
- package/public/dashboard/assets/d8c30647abfeffe6-eXO_dkmS.woff2 +0 -0
- package/public/dashboard/assets/eb83d8d40af4411f-Buze_B52.woff2 +0 -0
- package/public/dashboard/assets/effc6711249e7349-qRpaaN48.woff2 +0 -0
- package/public/dashboard/assets/gateway-BDYet0pI.css +1 -0
- package/public/dashboard/assets/gateway-BYt6-s1O.js +1 -0
- package/public/dashboard/assets/index-B9wFpD_z.css +2 -0
- package/public/dashboard/assets/index-DWcQmu0_.js +124 -0
- package/public/dashboard/assets/index-Da-j89O-.js +458 -0
- package/public/dashboard/font-licenses/jetbrainsmono-OFL.txt +93 -0
- package/public/dashboard/font-licenses/plusjakartasans-OFL.txt +93 -0
- package/public/dashboard/font-licenses/tajawal-OFL.txt +93 -0
- package/public/dashboard/gateway.html +17 -0
- package/public/dashboard/index.html +3 -5
- package/public/ui-boot.js +33 -14
- package/scheduler.cjs +76 -23
- package/src/auth/auth-storage.cjs +54 -7
- package/src/auth/use-database-auth-state.js +70 -39
- package/src/automation/engine.js +412 -0
- package/src/automation/limits.cjs +6 -0
- package/src/automation/manage.js +290 -0
- package/src/automation/reactions.js +471 -0
- package/src/automation/rules.cjs +114 -0
- package/src/automation/status.cjs +76 -0
- package/src/backup/account.cjs +29 -0
- package/src/backup/activation.cjs +247 -0
- package/src/backup/content.cjs +36 -0
- package/src/backup/create.cjs +280 -0
- package/src/backup/extensions.cjs +101 -0
- package/src/backup/format.cjs +565 -0
- package/src/backup/jobs.cjs +111 -0
- package/src/backup/journal.cjs +41 -0
- package/src/backup/plan.cjs +223 -0
- package/src/backup/recovery.cjs +110 -0
- package/src/backup/restore.cjs +460 -0
- package/src/backup/uploads.cjs +146 -0
- package/src/bootstrap/core.js +50 -12
- package/src/bootstrap/panel.js +53 -2
- package/src/bootstrap/session-startup-policy.js +8 -1
- package/src/cli.js +163 -22
- package/src/commands/autodelete.cjs +41 -57
- package/src/commands/autoschedule.cjs +7 -33
- package/src/commands/blacklist.cjs +17 -35
- package/src/commands/block.cjs +4 -18
- package/src/commands/calc.cjs +22 -74
- package/src/commands/debt.cjs +28 -59
- package/src/commands/deleteschedule.cjs +7 -23
- package/src/commands/digit.cjs +5 -39
- package/src/commands/gemini.cjs +135 -218
- package/src/commands/group/add.cjs +28 -76
- package/src/commands/group/all.cjs +4 -15
- package/src/commands/group/antilink.cjs +28 -41
- package/src/commands/group/antispam.cjs +25 -35
- package/src/commands/group/approveall.cjs +7 -21
- package/src/commands/group/clearwarns.cjs +4 -18
- package/src/commands/group/deletenote.cjs +4 -18
- package/src/commands/group/demote.cjs +6 -23
- package/src/commands/group/flagged.cjs +10 -19
- package/src/commands/group/kick.cjs +26 -36
- package/src/commands/group/media.cjs +21 -36
- package/src/commands/group/members.cjs +16 -28
- package/src/commands/group/note.cjs +3 -14
- package/src/commands/group/policy.cjs +16 -37
- package/src/commands/group/promote.cjs +5 -22
- package/src/commands/group/removeall.cjs +6 -38
- package/src/commands/group/rules.cjs +4 -19
- package/src/commands/group/save.cjs +4 -18
- package/src/commands/group/setname.cjs +5 -19
- package/src/commands/group/setpp.cjs +8 -26
- package/src/commands/group/setrules.cjs +4 -15
- package/src/commands/group/setwarn.cjs +6 -23
- package/src/commands/group/tagadmins.cjs +5 -16
- package/src/commands/group/warn.cjs +5 -16
- package/src/commands/group/warns.cjs +12 -33
- package/src/commands/group/welcome.cjs +17 -34
- package/src/commands/group.cjs +91 -68
- package/src/commands/help.cjs +48 -89
- package/src/commands/lang.cjs +38 -97
- package/src/commands/listschedules.cjs +19 -30
- package/src/commands/loop.cjs +9 -55
- package/src/commands/md.cjs +2 -13
- package/src/commands/memory.cjs +53 -87
- package/src/commands/mod.cjs +40 -79
- package/src/commands/notes.cjs +4 -15
- package/src/commands/pack.cjs +26 -49
- package/src/commands/packs.cjs +8 -18
- package/src/commands/perm.cjs +48 -51
- package/src/commands/ping.cjs +2 -10
- package/src/commands/poll.cjs +5 -38
- package/src/commands/prayer.cjs +55 -36
- package/src/commands/qr.cjs +4 -18
- package/src/commands/rand.cjs +9 -58
- package/src/commands/restart.cjs +15 -33
- package/src/commands/schedule.cjs +5 -25
- package/src/commands/score.cjs +6 -27
- package/src/commands/send.cjs +4 -18
- package/src/commands/setprefix.cjs +11 -23
- package/src/commands/shortlink.cjs +13 -39
- package/src/commands/status.cjs +188 -76
- package/src/commands/sticker.cjs +5 -16
- package/src/commands/stickers.cjs +16 -20
- package/src/commands/stopbot.cjs +9 -25
- package/src/commands/stt.cjs +75 -107
- package/src/commands/todo.cjs +11 -31
- package/src/commands/toimage.cjs +11 -27
- package/src/commands/translate.cjs +53 -36
- package/src/commands/tts.cjs +46 -40
- package/src/commands/unblock.cjs +3 -17
- package/src/commands/update.cjs +23 -0
- package/src/commands/weather.cjs +40 -47
- package/src/config/ai-identity.cjs +14 -1
- package/src/config/baileys.config.js +16 -3
- package/src/config/data-dir.cjs +37 -0
- package/src/config/defaults.cjs +1 -0
- package/src/config/exit-codes.cjs +11 -0
- package/src/config/lock.cjs +55 -81
- package/src/config/official-links.cjs +61 -0
- package/src/config/paths.cjs +4 -33
- package/src/config/release.cjs +87 -0
- package/src/config/settings.cjs +199 -10
- package/src/core/connection.js +77 -9
- package/src/core/events.js +119 -33
- package/src/core/session.js +536 -84
- package/src/core/socket.js +81 -10
- package/src/db/copy.cjs +136 -0
- package/src/db/db.cjs +241 -36
- package/src/db/startup-guard.js +5 -0
- package/src/db/store.cjs +561 -54
- package/src/diagnostics/baileysLog.cjs +87 -0
- package/src/diagnostics/debugLog.cjs +16 -4
- package/src/diagnostics/device.cjs +4 -2
- package/src/diagnostics/nodeRuntime.cjs +131 -0
- package/src/diagnostics/signalSessionInspect.cjs +38 -0
- package/src/domain/command.js +24 -22
- package/src/extensions/autoReply.cjs +521 -0
- package/src/extensions/context.cjs +73 -0
- package/src/extensions/contract.cjs +69 -0
- package/src/extensions/entitlement/client.cjs +381 -0
- package/src/extensions/entitlement/index.cjs +629 -0
- package/src/extensions/entitlement/installation.cjs +117 -0
- package/src/extensions/entitlement/keys.cjs +72 -0
- package/src/extensions/entitlement/state.cjs +201 -0
- package/src/extensions/entitlement/target.cjs +7 -0
- package/src/extensions/entitlement/token.cjs +225 -0
- package/src/extensions/host.cjs +519 -0
- package/src/extensions/templateKeys.cjs +81 -0
- package/src/handlers/command.handler.js +191 -64
- package/src/handlers/group.handler.js +78 -18
- package/src/handlers/message.handler.js +56 -25
- package/src/i18n/catalog.generated.cjs +3537 -0
- package/src/index.js +51 -12
- package/src/legal/bundled/ar.json +102 -0
- package/src/legal/bundled/en.json +102 -0
- package/src/legal/bundled/es-419.json +102 -0
- package/src/legal/bundled/pt-BR.json +102 -0
- package/src/legal/cli.cjs +200 -0
- package/src/legal/consent.cjs +187 -0
- package/src/legal/document.cjs +156 -0
- package/src/legal/keys.cjs +100 -0
- package/src/legal/release.cjs +226 -0
- package/src/legal/remote.cjs +419 -0
- package/src/legal/terms.cjs +142 -0
- package/src/messaging/escape.cjs +31 -0
- package/src/messaging/health.cjs +65 -0
- package/src/messaging/identity.cjs +42 -0
- package/src/messaging/message.cjs +136 -0
- package/src/messaging/parser.cjs +88 -0
- package/src/messaging/router.cjs +217 -0
- package/src/middleware/permissions.middleware.js +34 -2
- package/src/panel/account-profile.cjs +489 -0
- package/src/panel/fallback-page.cjs +177 -0
- package/src/panel/password-reset.cjs +13 -14
- package/src/panel/recovery-email.cjs +3 -1
- package/src/routes/backup.api.esm.js +175 -0
- package/src/routes/dashboard.api.esm.js +183 -7
- package/src/routes/plus.api.esm.js +172 -0
- package/src/routes/reactions.api.esm.js +60 -0
- package/src/services/aiAgent.cjs +56 -43
- package/src/services/aiDocs.cjs +187 -0
- package/src/services/aiImage.cjs +183 -0
- package/src/services/aiMedia.cjs +146 -0
- package/src/services/aiProviders.cjs +76 -80
- package/src/services/aiRouter.cjs +2 -2
- package/src/services/aiToolAuth.cjs +76 -4
- package/src/services/aiTools.cjs +431 -105
- package/src/services/autoDelete.cjs +9 -1
- package/src/services/levix-docs.generated.json +2623 -0
- package/src/services/memoryPolicy.cjs +56 -0
- package/src/services/updateCheck.cjs +362 -0
- package/src/stickers/errors.cjs +53 -97
- package/src/stickers/library.cjs +13 -6
- package/src/stickers/owner.cjs +1 -1
- package/src/utils/commandContext.cjs +13 -0
- package/src/utils/commandDocs.cjs +42 -20
- package/src/utils/geminiHttpOptions.cjs +56 -0
- package/src/utils/geminiMedia.cjs +28 -3
- package/src/utils/groupMetadataCache.cjs +386 -21
- package/src/utils/httpsFetch.cjs +113 -0
- package/src/utils/i18n.cjs +117 -7
- package/src/utils/linkPreview.cjs +90 -0
- package/src/utils/logger.cjs +6 -0
- package/src/utils/markdownParser.cjs +3 -3
- package/src/utils/memory.cjs +375 -28
- package/src/utils/messageContent.cjs +7 -1
- package/src/utils/moderationAction.cjs +116 -73
- package/src/utils/moderationSummary.cjs +32 -56
- package/src/utils/permissionLevel.cjs +7 -28
- package/src/utils/permissions.cjs +23 -14
- package/src/utils/permissions.esm.js +99 -166
- package/src/utils/recentMessageCache.esm.js +241 -37
- package/src/utils/recurrence.cjs +78 -66
- package/src/utils/sendBotMessage.cjs +14 -29
- package/src/utils/sendBotMessage.esm.js +28 -13
- package/src/utils/statusMessage.cjs +94 -33
- package/src/utils/stickerBot.cjs +18 -16
- package/src/utils/storage.cjs +2 -0
- package/src/utils/storage.esm.js +2 -0
- package/src/utils/thumbnail.cjs +5 -21
- package/public/dashboard/assets/index-B1sOW2VX.js +0 -561
- package/public/dashboard/assets/index-CK8osB4o.css +0 -2
- package/public/dashboard.css +0 -3127
- package/public/dashboard.js +0 -1981
- package/public/gateway-i18n.js +0 -321
- package/public/gateway.js +0 -70
- package/views/dashboard.ejs +0 -775
- package/views/login.ejs +0 -408
- package/views/qr.ejs +0 -155
- package/views/setup.ejs +0 -118
|
@@ -2,18 +2,10 @@ const { scheduleNewJob, saveScheduledJob } = require("../../scheduler.cjs");
|
|
|
2
2
|
const { randomUUID } = require("node:crypto");
|
|
3
3
|
const logger = require("../utils/logger.cjs");
|
|
4
4
|
const { parseRecurringArgs } = require("../utils/recurrence.cjs");
|
|
5
|
-
const {
|
|
5
|
+
const { t } = require("../utils/i18n.cjs");
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
name: "autoschedule",
|
|
9
|
-
description: {
|
|
10
|
-
en: "Schedules a recurring message (daily or weekly).",
|
|
11
|
-
ar: "يجدول رسالة متكررة (يومية أو أسبوعية).",
|
|
12
|
-
},
|
|
13
|
-
usage: {
|
|
14
|
-
en: "autoschedule daily <HH:mm> <message>\nautoschedule weekly <day> <HH:mm> <message>",
|
|
15
|
-
ar: "autoschedule daily <HH:mm> <الرسالة>\nautoschedule weekly <اليوم> <HH:mm> <الرسالة>",
|
|
16
|
-
},
|
|
17
9
|
chat: "all",
|
|
18
10
|
|
|
19
11
|
async execute(sock, msg, args) {
|
|
@@ -23,26 +15,11 @@ module.exports = {
|
|
|
23
15
|
|
|
24
16
|
if (parsed.error) {
|
|
25
17
|
const errors = {
|
|
26
|
-
usage:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
|
|
31
|
-
"Unsupported type. Use `daily` or `weekly`.",
|
|
32
|
-
"النوع غير مدعوم. استخدم: `daily` أو `weekly`.",
|
|
33
|
-
),
|
|
34
|
-
day: tr(
|
|
35
|
-
"Invalid day. Use the day's name in English or Arabic, or a number from 0 to 7 (0 and 7 are Sunday).",
|
|
36
|
-
"اليوم غير صالح. استخدم اسم اليوم بالعربية أو الإنجليزية، أو رقمًا من 0 إلى 7 (0 و7 للأحد).",
|
|
37
|
-
),
|
|
38
|
-
time: tr(
|
|
39
|
-
"Invalid time. Use `HH:mm` (for example `09:30`).",
|
|
40
|
-
"الوقت غير صالح. استخدم صيغة `HH:mm` (مثال: `09:30`).",
|
|
41
|
-
),
|
|
42
|
-
message: tr(
|
|
43
|
-
"Write the message you want to schedule after the time.",
|
|
44
|
-
"اكتب الرسالة التي تريد جدولتها بعد الوقت.",
|
|
45
|
-
),
|
|
18
|
+
usage: t("bot.schedules.autoschedule.usage"),
|
|
19
|
+
type: t("bot.schedules.autoschedule.type"),
|
|
20
|
+
day: t("bot.schedules.autoschedule.day"),
|
|
21
|
+
time: t("bot.schedules.autoschedule.time"),
|
|
22
|
+
message: t("bot.schedules.autoschedule.message"),
|
|
46
23
|
};
|
|
47
24
|
return await sock.sendMessage(creatorJid, {
|
|
48
25
|
text: errors[parsed.error],
|
|
@@ -62,10 +39,7 @@ module.exports = {
|
|
|
62
39
|
// الجدولة الأول: جوب مش قادرين نجدوله ما يتخزّنش في الملف أصلاً.
|
|
63
40
|
if (!scheduleNewJob(sock, newJob)) {
|
|
64
41
|
return await sock.sendMessage(creatorJid, {
|
|
65
|
-
text:
|
|
66
|
-
"I couldn't schedule that message. Check the time and try again.",
|
|
67
|
-
"تعذّرت جدولة هذه الرسالة. راجع الوقت وحاول مرة أخرى.",
|
|
68
|
-
),
|
|
42
|
+
text: t("bot.schedules.autoschedule.couldNotSchedule"),
|
|
69
43
|
});
|
|
70
44
|
}
|
|
71
45
|
|
|
@@ -3,7 +3,7 @@ const { getGroupSettings, saveGroupSettings } = require("../utils/storage.cjs");
|
|
|
3
3
|
const logger = require("../utils/logger.cjs");
|
|
4
4
|
const normalizeJid = require("../utils/normalizeJid.esm.js").default;
|
|
5
5
|
const { isAdminInGroupSync, sameUserSync } = require("../utils/permissions.cjs");
|
|
6
|
-
const {
|
|
6
|
+
const { t } = require("../utils/i18n.cjs");
|
|
7
7
|
|
|
8
8
|
function sameIdentity(a, b) {
|
|
9
9
|
return normalizeJid(a) === normalizeJid(b) || sameUserSync(a, b);
|
|
@@ -12,14 +12,6 @@ function sameIdentity(a, b) {
|
|
|
12
12
|
module.exports = {
|
|
13
13
|
name: "blacklist",
|
|
14
14
|
aliases: ["unblacklist", "block", "unblock"], // We keep aliases here for a reason
|
|
15
|
-
description: {
|
|
16
|
-
en: "Manages the group's user blacklist.",
|
|
17
|
-
ar: "يدير القائمة السوداء لأعضاء المجموعة.",
|
|
18
|
-
},
|
|
19
|
-
usage: {
|
|
20
|
-
en: "blacklist [add|remove|list] [@member|number]",
|
|
21
|
-
ar: "blacklist [add|remove|list] [@عضو|رقم]",
|
|
22
|
-
},
|
|
23
15
|
chat: "group",
|
|
24
16
|
userAdminRequired: true,
|
|
25
17
|
|
|
@@ -51,13 +43,10 @@ module.exports = {
|
|
|
51
43
|
if (action === "list") {
|
|
52
44
|
if (settings.blacklist.length === 0)
|
|
53
45
|
return await sock.sendMessage(groupId, {
|
|
54
|
-
text:
|
|
46
|
+
text: t("bot.moderation.blacklist.theBlacklistIsEmpty"),
|
|
55
47
|
});
|
|
56
48
|
|
|
57
|
-
let listReply =
|
|
58
|
-
"*🚫 Users blocked from the bot:*\n\n",
|
|
59
|
-
"*🚫 قائمة المستخدمين المحظورين من البوت:*\n\n",
|
|
60
|
-
);
|
|
49
|
+
let listReply = t("bot.moderation.blacklist.usersBlockedFromTheBot");
|
|
61
50
|
settings.blacklist.forEach((jid) => {
|
|
62
51
|
listReply += `» @${jid.split("@")[0]}\n`;
|
|
63
52
|
});
|
|
@@ -74,10 +63,7 @@ module.exports = {
|
|
|
74
63
|
|
|
75
64
|
if (!targetJid)
|
|
76
65
|
return await sock.sendMessage(groupId, {
|
|
77
|
-
text:
|
|
78
|
-
"Mention the member or type their number to do that.",
|
|
79
|
-
"لتنفيذ هذا الإجراء، قم بعمل منشن للعضو أو كتابة رقمه.",
|
|
80
|
-
),
|
|
66
|
+
text: t("bot.moderation.blacklist.mentionTheMemberOrType"),
|
|
81
67
|
});
|
|
82
68
|
|
|
83
69
|
const normalizedTargetJid = normalizeJid(targetJid);
|
|
@@ -94,32 +80,29 @@ module.exports = {
|
|
|
94
80
|
);
|
|
95
81
|
if (targetIsAdmin)
|
|
96
82
|
return await sock.sendMessage(groupId, {
|
|
97
|
-
text:
|
|
83
|
+
text: t("bot.moderation.blacklist.adminsCanTBeBlacklisted"),
|
|
98
84
|
});
|
|
99
85
|
if (settings.blacklist.some((jid) => sameIdentity(jid, normalizedTargetJid)))
|
|
100
86
|
return await sock.sendMessage(groupId, {
|
|
101
|
-
text:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
),
|
|
87
|
+
text: t("bot.moderation.blacklist.isAlreadyBlacklisted", {
|
|
88
|
+
member: normalizedTargetJid.split("@")[0],
|
|
89
|
+
}),
|
|
105
90
|
mentions: [normalizedTargetJid],
|
|
106
91
|
});
|
|
107
92
|
|
|
108
93
|
settings.blacklist.push(normalizedTargetJid);
|
|
109
94
|
await sock.sendMessage(groupId, {
|
|
110
|
-
text:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
),
|
|
95
|
+
text: t("bot.moderation.blacklist.wasAddedToTheBlacklist", {
|
|
96
|
+
member: normalizedTargetJid.split("@")[0],
|
|
97
|
+
}),
|
|
114
98
|
mentions: [normalizedTargetJid],
|
|
115
99
|
});
|
|
116
100
|
} else if (action === "remove") {
|
|
117
101
|
if (!settings.blacklist.some((jid) => sameIdentity(jid, normalizedTargetJid)))
|
|
118
102
|
return await sock.sendMessage(groupId, {
|
|
119
|
-
text:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
),
|
|
103
|
+
text: t("bot.moderation.blacklist.isnTOnTheBlacklist", {
|
|
104
|
+
member: normalizedTargetJid.split("@")[0],
|
|
105
|
+
}),
|
|
123
106
|
mentions: [normalizedTargetJid],
|
|
124
107
|
});
|
|
125
108
|
|
|
@@ -127,10 +110,9 @@ module.exports = {
|
|
|
127
110
|
(jid) => !sameIdentity(jid, normalizedTargetJid),
|
|
128
111
|
);
|
|
129
112
|
await sock.sendMessage(groupId, {
|
|
130
|
-
text:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
),
|
|
113
|
+
text: t("bot.moderation.blacklist.wasRemovedFromTheBlacklist", {
|
|
114
|
+
member: normalizedTargetJid.split("@")[0],
|
|
115
|
+
}),
|
|
134
116
|
mentions: [normalizedTargetJid],
|
|
135
117
|
});
|
|
136
118
|
}
|
package/src/commands/block.cjs
CHANGED
|
@@ -2,18 +2,10 @@
|
|
|
2
2
|
const logger = require("../utils/logger.cjs");
|
|
3
3
|
const { isOwnerJidSync } = require("../utils/permissions.cjs");
|
|
4
4
|
const normalizeJid = require("../utils/normalizeJid.esm.js").default;
|
|
5
|
-
const {
|
|
5
|
+
const { t } = require("../utils/i18n.cjs");
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
name: "block",
|
|
9
|
-
description: {
|
|
10
|
-
en: "Blocks a user from contacting the bot on WhatsApp.",
|
|
11
|
-
ar: "يحظر مستخدمًا من التواصل مع البوت على واتساب.",
|
|
12
|
-
},
|
|
13
|
-
usage: {
|
|
14
|
-
en: "block [@member|number] (or reply to their message)",
|
|
15
|
-
ar: "block [@عضو|رقم] (أو رد على رسالته)",
|
|
16
|
-
},
|
|
17
9
|
chat: "all",
|
|
18
10
|
|
|
19
11
|
async execute(sock, msg, args) {
|
|
@@ -40,10 +32,7 @@ module.exports = {
|
|
|
40
32
|
targetJid = `${numberArg.replace(/\D/g, "")}@s.whatsapp.net`;
|
|
41
33
|
} else {
|
|
42
34
|
return await sock.sendMessage(remoteJid, {
|
|
43
|
-
text:
|
|
44
|
-
"Use this in a private chat with no arguments, or mention / reply to / type the number of the user.",
|
|
45
|
-
"لكي يعمل هذا الأمر، استخدمه في شات خاص بدون وسائط، أو قم بعمل منشن/رد/كتابة رقم المستخدم.",
|
|
46
|
-
),
|
|
35
|
+
text: t("bot.moderation.block.useThisInAPrivate"),
|
|
47
36
|
});
|
|
48
37
|
}
|
|
49
38
|
}
|
|
@@ -53,7 +42,7 @@ module.exports = {
|
|
|
53
42
|
// Safety Check
|
|
54
43
|
if (isOwnerJidSync(normalizedTargetJid)) {
|
|
55
44
|
return await sock.sendMessage(remoteJid, {
|
|
56
|
-
text:
|
|
45
|
+
text: t("bot.moderation.block.youCanTBlockThe"),
|
|
57
46
|
});
|
|
58
47
|
}
|
|
59
48
|
|
|
@@ -71,10 +60,7 @@ module.exports = {
|
|
|
71
60
|
} catch (error) {
|
|
72
61
|
logger.error({ err: error, command: "block" }, "Error in !block command");
|
|
73
62
|
await sock.sendMessage(remoteJid, {
|
|
74
|
-
text:
|
|
75
|
-
"Something went wrong while blocking the user.",
|
|
76
|
-
"حدث خطأ أثناء محاولة حظر المستخدم.",
|
|
77
|
-
),
|
|
63
|
+
text: t("bot.moderation.block.somethingWentWrongWhileBlocking"),
|
|
78
64
|
});
|
|
79
65
|
}
|
|
80
66
|
},
|
package/src/commands/calc.cjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// FUNCTIONS.
|
|
11
11
|
|
|
12
12
|
const { sendBotMessage } = require("../utils/sendBotMessage.cjs");
|
|
13
|
-
const {
|
|
13
|
+
const { t } = require("../utils/i18n.cjs");
|
|
14
14
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
// whitelist
|
|
@@ -62,10 +62,10 @@ const FUNCTIONS = {
|
|
|
62
62
|
function factorial(n) {
|
|
63
63
|
if (!Number.isInteger(n)) {
|
|
64
64
|
throw new CalcError(
|
|
65
|
-
|
|
65
|
+
t("bot.tools.calc.factorialWholeNumbers"),
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
if (n < 0) throw new CalcError(
|
|
68
|
+
if (n < 0) throw new CalcError(t("bot.tools.calc.factorialNegative"));
|
|
69
69
|
if (n > 170) return Infinity; // beyond this a double is Infinity anyway
|
|
70
70
|
let result = 1;
|
|
71
71
|
for (let i = 2; i <= n; i++) result *= i;
|
|
@@ -135,7 +135,7 @@ function tokenize(text) {
|
|
|
135
135
|
}
|
|
136
136
|
const value = Number(raw);
|
|
137
137
|
if (!Number.isFinite(value)) {
|
|
138
|
-
throw new CalcError(
|
|
138
|
+
throw new CalcError(t("bot.tools.calc.invalidNumber", { raw }));
|
|
139
139
|
}
|
|
140
140
|
tokens.push({ type: "num", value });
|
|
141
141
|
continue;
|
|
@@ -154,7 +154,7 @@ function tokenize(text) {
|
|
|
154
154
|
continue;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
throw new CalcError(
|
|
157
|
+
throw new CalcError(t("bot.tools.calc.unknownSymbol", { char }));
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
return tokens;
|
|
@@ -199,7 +199,7 @@ function parse(tokens) {
|
|
|
199
199
|
} else if (eat("/")) {
|
|
200
200
|
const right = parseUnary();
|
|
201
201
|
if (right === 0) {
|
|
202
|
-
throw new CalcError(
|
|
202
|
+
throw new CalcError(t("bot.tools.calc.divisionByZero"));
|
|
203
203
|
}
|
|
204
204
|
left /= right;
|
|
205
205
|
} else if (peek()?.type === "%" && startsValue(peek(1))) {
|
|
@@ -207,7 +207,7 @@ function parse(tokens) {
|
|
|
207
207
|
pos++;
|
|
208
208
|
const right = parseUnary();
|
|
209
209
|
if (right === 0) {
|
|
210
|
-
throw new CalcError(
|
|
210
|
+
throw new CalcError(t("bot.tools.calc.moduloByZero"));
|
|
211
211
|
}
|
|
212
212
|
left %= right;
|
|
213
213
|
} else if (startsValue(peek())) {
|
|
@@ -247,11 +247,11 @@ function parse(tokens) {
|
|
|
247
247
|
|
|
248
248
|
function parsePrimary() {
|
|
249
249
|
const token = peek();
|
|
250
|
-
if (!token) throw new CalcError(
|
|
250
|
+
if (!token) throw new CalcError(t("bot.tools.calc.emptyExpression"));
|
|
251
251
|
|
|
252
252
|
if (eat("(")) {
|
|
253
253
|
const value = parseExpression();
|
|
254
|
-
expect(")",
|
|
254
|
+
expect(")", t("bot.tools.calc.unclosedBracket"));
|
|
255
255
|
return value;
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -268,28 +268,22 @@ function parse(tokens) {
|
|
|
268
268
|
const spec = FUNCTIONS[name];
|
|
269
269
|
expect(
|
|
270
270
|
"(",
|
|
271
|
-
|
|
272
|
-
`The function \`${name}\` needs brackets, like \`${name}(9)\``,
|
|
273
|
-
`الدالة \`${name}\` محتاجة أقواس، زي \`${name}(9)\``,
|
|
274
|
-
),
|
|
271
|
+
t("bot.tools.calc.needsBrackets", { name }),
|
|
275
272
|
);
|
|
276
273
|
const args = [];
|
|
277
274
|
if (peek()?.type !== ")") {
|
|
278
275
|
args.push(parseExpression());
|
|
279
276
|
while (eat(",")) args.push(parseExpression());
|
|
280
277
|
}
|
|
281
|
-
expect(")",
|
|
278
|
+
expect(")", t("bot.tools.calc.unfinishedBracket", { name }));
|
|
282
279
|
if (spec.arity !== -1 && args.length !== spec.arity) {
|
|
283
280
|
throw new CalcError(
|
|
284
|
-
|
|
285
|
-
`The function \`${name}\` takes ${spec.arity} ${spec.arity === 1 ? "value" : "values"}`,
|
|
286
|
-
`الدالة \`${name}\` بتاخد ${spec.arity} ${spec.arity === 1 ? "قيمة" : "قيم"}`,
|
|
287
|
-
),
|
|
281
|
+
t("bot.tools.calc.functionArity", { name, count: spec.arity }),
|
|
288
282
|
);
|
|
289
283
|
}
|
|
290
284
|
if (!args.length) {
|
|
291
285
|
throw new CalcError(
|
|
292
|
-
|
|
286
|
+
t("bot.tools.calc.functionNoValues", { name }),
|
|
293
287
|
);
|
|
294
288
|
}
|
|
295
289
|
return spec.fn(...args);
|
|
@@ -297,18 +291,18 @@ function parse(tokens) {
|
|
|
297
291
|
|
|
298
292
|
if (name in CONSTANTS) return CONSTANTS[name];
|
|
299
293
|
|
|
300
|
-
throw new CalcError(
|
|
294
|
+
throw new CalcError(t("bot.tools.calc.unknownName", { name }));
|
|
301
295
|
}
|
|
302
296
|
|
|
303
297
|
throw new CalcError(
|
|
304
|
-
|
|
298
|
+
t("bot.tools.calc.wrongTokenPlace", { symbol: token.type }),
|
|
305
299
|
);
|
|
306
300
|
}
|
|
307
301
|
|
|
308
302
|
const result = parseExpression();
|
|
309
303
|
if (pos < tokens.length) {
|
|
310
304
|
throw new CalcError(
|
|
311
|
-
|
|
305
|
+
t("bot.tools.calc.trailingContent"),
|
|
312
306
|
);
|
|
313
307
|
}
|
|
314
308
|
return result;
|
|
@@ -316,14 +310,14 @@ function parse(tokens) {
|
|
|
316
310
|
|
|
317
311
|
function evaluate(expression) {
|
|
318
312
|
const normalized = normalize(expression);
|
|
319
|
-
if (!normalized) throw new CalcError(
|
|
313
|
+
if (!normalized) throw new CalcError(t("bot.tools.calc.typeExpression"));
|
|
320
314
|
if (normalized.length > 300) {
|
|
321
|
-
throw new CalcError(
|
|
315
|
+
throw new CalcError(t("bot.tools.calc.expressionTooLong"));
|
|
322
316
|
}
|
|
323
317
|
|
|
324
318
|
const value = parse(tokenize(normalized));
|
|
325
319
|
if (typeof value !== "number" || Number.isNaN(value)) {
|
|
326
|
-
throw new CalcError(
|
|
320
|
+
throw new CalcError(t("bot.tools.calc.invalidResult"));
|
|
327
321
|
}
|
|
328
322
|
return { normalized, value };
|
|
329
323
|
}
|
|
@@ -348,54 +342,11 @@ function formatNumber(value) {
|
|
|
348
342
|
return fraction ? `${grouped}.${fraction}` : grouped;
|
|
349
343
|
}
|
|
350
344
|
|
|
351
|
-
const helpText = () =>
|
|
352
|
-
tr(
|
|
353
|
-
"🧮 *Calculator*\n\n" +
|
|
354
|
-
"*Usage:* `!calc <expression>`\n" +
|
|
355
|
-
"or reply to a message containing an expression with `!calc`\n\n" +
|
|
356
|
-
"*Operators:* `+` `-` `*` `/` `%` (modulo) `^` (power) `!` (factorial)\n" +
|
|
357
|
-
"*Percentages:* `15%` · `20% of 300`\n" +
|
|
358
|
-
"*Constants:* `pi` · `e` · `tau`\n" +
|
|
359
|
-
"*Functions:* sqrt, cbrt, abs, round, floor, ceil, ln, log, log2, exp,\n" +
|
|
360
|
-
"sin, cos, tan, sind, cosd, tand, asin, acos, atan, deg, rad,\n" +
|
|
361
|
-
"pow, root, hypot, min, max, avg, sum, fact\n\n" +
|
|
362
|
-
"*Examples:*\n" +
|
|
363
|
-
"`!calc (12 + 8) * 3`\n" +
|
|
364
|
-
"`!calc 2^10`\n" +
|
|
365
|
-
"`!calc 25% of 480`\n" +
|
|
366
|
-
"`!calc sqrt(144) + 5!`\n" +
|
|
367
|
-
"`!calc max(3, 9, 4) * pi`",
|
|
368
|
-
HELP_TEXT_AR,
|
|
369
|
-
);
|
|
370
|
-
|
|
371
|
-
const HELP_TEXT_AR =
|
|
372
|
-
"🧮 *الآلة الحاسبة*\n\n" +
|
|
373
|
-
"*الاستخدام:* `!calc <معادلة>`\n" +
|
|
374
|
-
"أو رد على رسالة فيها معادلة واكتب `!calc`\n\n" +
|
|
375
|
-
"*العمليات:* `+` `-` `*` `/` `%` (باقي القسمة) `^` (أُس) `!` (مضروب)\n" +
|
|
376
|
-
"*النِّسب:* `15%` · `20% من 300`\n" +
|
|
377
|
-
"*الثوابت:* `pi` · `e` · `tau`\n" +
|
|
378
|
-
"*الدوال:* sqrt, cbrt, abs, round, floor, ceil, ln, log, log2, exp,\n" +
|
|
379
|
-
"sin, cos, tan, sind, cosd, tand, asin, acos, atan, deg, rad,\n" +
|
|
380
|
-
"pow, root, hypot, min, max, avg, sum, fact\n\n" +
|
|
381
|
-
"*أمثلة:*\n" +
|
|
382
|
-
"`!calc (12 + 8) * 3`\n" +
|
|
383
|
-
"`!calc 2^10`\n" +
|
|
384
|
-
"`!calc 25% من 480`\n" +
|
|
385
|
-
"`!calc sqrt(144) + 5!`\n" +
|
|
386
|
-
"`!calc max(3, 9, 4) * pi`";
|
|
345
|
+
const helpText = () => t("bot.tools.calc.help");
|
|
387
346
|
|
|
388
347
|
module.exports = {
|
|
389
348
|
name: "calc",
|
|
390
349
|
aliases: ["calculate", "حساب", "احسب", "="],
|
|
391
|
-
description: {
|
|
392
|
-
en: "Calculator: arithmetic, percentages, powers and math functions.",
|
|
393
|
-
ar: "آلة حاسبة: عمليات حسابية، ونِسب مئوية، وأُسس، ودوال رياضية.",
|
|
394
|
-
},
|
|
395
|
-
usage: {
|
|
396
|
-
en: "calc <expression>",
|
|
397
|
-
ar: "calc <معادلة>",
|
|
398
|
-
},
|
|
399
350
|
chat: "all",
|
|
400
351
|
|
|
401
352
|
async execute(sock, msg, args) {
|
|
@@ -425,15 +376,12 @@ module.exports = {
|
|
|
425
376
|
const reason =
|
|
426
377
|
error instanceof CalcError
|
|
427
378
|
? error.message
|
|
428
|
-
:
|
|
379
|
+
: t("bot.tools.calc.unclearExpression");
|
|
429
380
|
return sendBotMessage(
|
|
430
381
|
sock,
|
|
431
382
|
chatId,
|
|
432
383
|
{
|
|
433
|
-
text:
|
|
434
|
-
`❌ ${reason}\n\nSend \`!calc\` on its own to see examples.`,
|
|
435
|
-
`❌ ${reason}\n\nاكتب \`!calc\` وحده لعرض الأمثلة.`,
|
|
436
|
-
),
|
|
384
|
+
text: t("bot.tools.calc.errorWithHint", { reason }),
|
|
437
385
|
},
|
|
438
386
|
{ replyTo: msg },
|
|
439
387
|
);
|
package/src/commands/debt.cjs
CHANGED
|
@@ -8,20 +8,12 @@ const {
|
|
|
8
8
|
listDebts: storeListDebts,
|
|
9
9
|
} = require("../utils/storage.cjs");
|
|
10
10
|
const logger = require("../utils/logger.cjs");
|
|
11
|
-
const {
|
|
11
|
+
const { t, intlTag } = require("../utils/i18n.cjs");
|
|
12
12
|
const normalizeJid = require("../utils/normalizeJid.esm.js").default;
|
|
13
13
|
|
|
14
14
|
module.exports = {
|
|
15
15
|
name: "debt",
|
|
16
16
|
aliases: ["دين", "owes"],
|
|
17
|
-
description: {
|
|
18
|
-
en: "Private debt tracker.",
|
|
19
|
-
ar: "نظام خاص لتتبّع الديون.",
|
|
20
|
-
},
|
|
21
|
-
usage: {
|
|
22
|
-
en: "debt add <amount> [description]\ndebt del <id>\ndebt list",
|
|
23
|
-
ar: "debt add <المبلغ> [الوصف]\ndebt del <id>\ndebt list",
|
|
24
|
-
},
|
|
25
17
|
chat: "private",
|
|
26
18
|
|
|
27
19
|
async execute(sock, msg, args) {
|
|
@@ -52,20 +44,7 @@ module.exports = {
|
|
|
52
44
|
|
|
53
45
|
default:
|
|
54
46
|
await sock.sendMessage(remote, {
|
|
55
|
-
text:
|
|
56
|
-
`📊 *Debt tracker (private chats only)*\n\n` +
|
|
57
|
-
`Commands:\n\n` +
|
|
58
|
-
`• \`!debt add <amount> [description]\` — add a debt\n` +
|
|
59
|
-
`• \`!debt list\` — list debts\n` +
|
|
60
|
-
`• \`!debt del <id>\` — delete a debt\n\n` +
|
|
61
|
-
`Example:\n\`!debt add 50 lunch\``,
|
|
62
|
-
`📊 *نظام الديون (خاص فقط)*\n\n` +
|
|
63
|
-
`الأوامر:\n\n` +
|
|
64
|
-
`• \`!debt add <amount> [description]\` — إضافة دين\n` +
|
|
65
|
-
`• \`!debt list\` — عرض الديون\n` +
|
|
66
|
-
`• \`!debt del <id>\` — حذف دين\n\n` +
|
|
67
|
-
`مثال:\n\`!debt add 50 غداء\``,
|
|
68
|
-
),
|
|
47
|
+
text: t("bot.tools.debt.help"),
|
|
69
48
|
});
|
|
70
49
|
}
|
|
71
50
|
},
|
|
@@ -76,19 +55,16 @@ async function addDebt(sock, msg, args, creditorId, debtorId, chatKey) {
|
|
|
76
55
|
|
|
77
56
|
if (args.length < 1) {
|
|
78
57
|
return sock.sendMessage(remote, {
|
|
79
|
-
text:
|
|
80
|
-
"❌ Usage: `!debt add <amount> [description]`",
|
|
81
|
-
"❌ الاستخدام: `!debt add <amount> [description]`",
|
|
82
|
-
),
|
|
58
|
+
text: t("bot.tools.debt.addUsage"),
|
|
83
59
|
});
|
|
84
60
|
}
|
|
85
61
|
|
|
86
62
|
const amount = parseFloat(args[0]);
|
|
87
|
-
const description = args.slice(1).join(" ") ||
|
|
63
|
+
const description = args.slice(1).join(" ") || t("bot.tools.debt.noDescription");
|
|
88
64
|
|
|
89
65
|
if (isNaN(amount) || amount <= 0) {
|
|
90
66
|
return sock.sendMessage(remote, {
|
|
91
|
-
text:
|
|
67
|
+
text: t("bot.tools.debt.amountInvalid"),
|
|
92
68
|
});
|
|
93
69
|
}
|
|
94
70
|
|
|
@@ -102,25 +78,18 @@ async function addDebt(sock, msg, args, creditorId, debtorId, chatKey) {
|
|
|
102
78
|
});
|
|
103
79
|
|
|
104
80
|
await sock.sendMessage(remote, {
|
|
105
|
-
text:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`✅ *تم إضافة الدين*\n\n` +
|
|
113
|
-
`المدين: ${debtorId.split("@")[0]}\n` +
|
|
114
|
-
`الدائن: ${creditorId.split("@")[0]}\n` +
|
|
115
|
-
`المبلغ: ${amount}\n` +
|
|
116
|
-
`الوصف: ${description}\n` +
|
|
117
|
-
`رقم السجل: #${debt.id}`,
|
|
118
|
-
),
|
|
81
|
+
text: t("bot.tools.debt.added", {
|
|
82
|
+
debtor: debtorId.split("@")[0],
|
|
83
|
+
creditor: creditorId.split("@")[0],
|
|
84
|
+
amount,
|
|
85
|
+
description,
|
|
86
|
+
id: debt.id,
|
|
87
|
+
}),
|
|
119
88
|
});
|
|
120
89
|
} catch (err) {
|
|
121
90
|
logger.error(err, "[Debt] Add error:");
|
|
122
91
|
await sock.sendMessage(remote, {
|
|
123
|
-
text:
|
|
92
|
+
text: t("bot.tools.debt.saveError"),
|
|
124
93
|
});
|
|
125
94
|
}
|
|
126
95
|
}
|
|
@@ -132,26 +101,26 @@ async function listDebts(sock, msg, creditorId, debtorId, chatKey) {
|
|
|
132
101
|
const debts = storeListDebts(chatKey, { settled: false });
|
|
133
102
|
|
|
134
103
|
if (debts.length === 0) {
|
|
135
|
-
return sock.sendMessage(remote, { text:
|
|
104
|
+
return sock.sendMessage(remote, { text: t("bot.tools.debt.listEmpty") });
|
|
136
105
|
}
|
|
137
106
|
|
|
138
|
-
let text =
|
|
107
|
+
let text = t("bot.tools.debt.listHeader");
|
|
139
108
|
|
|
140
109
|
debts.forEach((d) => {
|
|
141
|
-
const date = new Date(d.created_at).toLocaleDateString(
|
|
110
|
+
const date = new Date(d.created_at).toLocaleDateString(intlTag());
|
|
142
111
|
text += `*#${d.id}*\n`;
|
|
143
|
-
text += `${
|
|
144
|
-
text += `${
|
|
145
|
-
text += `${
|
|
146
|
-
text += `${
|
|
147
|
-
text += `${
|
|
112
|
+
text += `${t("bot.tools.debt.debtorLabel")}: ${d.debtor_id.split("@")[0]}\n`;
|
|
113
|
+
text += `${t("bot.tools.debt.creditorLabel")}: ${d.creditor_id.split("@")[0]}\n`;
|
|
114
|
+
text += `${t("bot.tools.debt.amountLabel")}: ${d.amount}\n`;
|
|
115
|
+
text += `${t("bot.tools.debt.descriptionLabel")}: ${d.description}\n`;
|
|
116
|
+
text += `${t("bot.tools.debt.dateLabel")}: ${date}\n\n`;
|
|
148
117
|
});
|
|
149
118
|
|
|
150
119
|
await sock.sendMessage(remote, { text });
|
|
151
120
|
} catch (err) {
|
|
152
121
|
logger.error(err, "[Debt] List error:");
|
|
153
122
|
await sock.sendMessage(remote, {
|
|
154
|
-
text:
|
|
123
|
+
text: t("bot.tools.debt.listError"),
|
|
155
124
|
});
|
|
156
125
|
}
|
|
157
126
|
}
|
|
@@ -161,14 +130,14 @@ async function deleteDebt(sock, msg, args, creditorId, debtorId, chatKey) {
|
|
|
161
130
|
|
|
162
131
|
if (args.length < 1) {
|
|
163
132
|
return sock.sendMessage(remote, {
|
|
164
|
-
text:
|
|
133
|
+
text: t("bot.tools.debt.delUsage"),
|
|
165
134
|
});
|
|
166
135
|
}
|
|
167
136
|
|
|
168
137
|
const id = parseInt(args[0]);
|
|
169
138
|
if (isNaN(id)) {
|
|
170
139
|
return sock.sendMessage(remote, {
|
|
171
|
-
text:
|
|
140
|
+
text: t("bot.tools.debt.invalidRecord"),
|
|
172
141
|
});
|
|
173
142
|
}
|
|
174
143
|
|
|
@@ -177,25 +146,25 @@ async function deleteDebt(sock, msg, args, creditorId, debtorId, chatKey) {
|
|
|
177
146
|
|
|
178
147
|
if (!debt) {
|
|
179
148
|
return sock.sendMessage(remote, {
|
|
180
|
-
text:
|
|
149
|
+
text: t("bot.tools.debt.notFound"),
|
|
181
150
|
});
|
|
182
151
|
}
|
|
183
152
|
|
|
184
153
|
if (debt.group_id !== chatKey) {
|
|
185
154
|
return sock.sendMessage(remote, {
|
|
186
|
-
text:
|
|
155
|
+
text: t("bot.tools.debt.wrongChat"),
|
|
187
156
|
});
|
|
188
157
|
}
|
|
189
158
|
|
|
190
159
|
storeDeleteDebt(id);
|
|
191
160
|
|
|
192
161
|
await sock.sendMessage(remote, {
|
|
193
|
-
text:
|
|
162
|
+
text: t("bot.tools.debt.deleted", { id }),
|
|
194
163
|
});
|
|
195
164
|
} catch (err) {
|
|
196
165
|
logger.error(err, "[Debt] Del error:");
|
|
197
166
|
await sock.sendMessage(remote, {
|
|
198
|
-
text:
|
|
167
|
+
text: t("bot.tools.debt.deleteError"),
|
|
199
168
|
});
|
|
200
169
|
}
|
|
201
170
|
}
|