From 88236d31e9a1ec6a2e56c161991e62964dc7fb57 Mon Sep 17 00:00:00 2001 From: Eternityyy Date: Tue, 5 Sep 2023 10:42:21 +0700 Subject: [PATCH] Fixed "owo undefined" and quote error --- package-lock.json | 4 ++-- package.json | 3 ++- run.cmd | 13 +++++++++++++ src/SelfbotWorker.ts | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 run.cmd diff --git a/package-lock.json b/package-lock.json index 047c803..aa373e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "discord-owo-selfbot", - "version": "2.2.0", + "version": "2.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "discord-owo-selfbot", - "version": "2.2.0", + "version": "2.2.2", "license": "MIT", "dependencies": { "2captcha": "^3.0.7", diff --git a/package.json b/package.json index 3573c9a..1e20224 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-owo-selfbot", - "version": "2.2.1", + "version": "2.2.2", "description": "Ain't the best OwO Tool Farm, but worth a try (why not?)", "type": "module", "engines": { @@ -8,6 +8,7 @@ }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", + "setup": "npm install", "start": "ts-node ." }, "repository": { diff --git a/run.cmd b/run.cmd new file mode 100644 index 0000000..9183766 --- /dev/null +++ b/run.cmd @@ -0,0 +1,13 @@ +@echo off + +echo Installing dependencies... +call npm i +IF %ERRORLEVEL% NEQ 0 ( + echo Failed to install dependencies. + exit /b 1 +) + +echo Starting index.ts... +npm run start + +pause \ No newline at end of file diff --git a/src/SelfbotWorker.ts b/src/SelfbotWorker.ts index 1084283..7db3abf 100644 --- a/src/SelfbotWorker.ts +++ b/src/SelfbotWorker.ts @@ -60,7 +60,7 @@ const aSleep = async () => { } const aOther = async () => { - const cmd = other[ranInt(0, ranInt.length)] + const cmd = other[ranInt(0, other.length)] await send(cmd) const filter = (m:Message) => m.author.id == global.owoID && (m.content.startsWith("🚫 **|** ") || m.content.startsWith(":no_entry_sign: **|** ")) const collector = global.channel.createMessageCollector({filter, max: 1, time: 10_000}) @@ -74,7 +74,7 @@ const aQuote = async () => { switch (ranInt(0, 3)) { case 1: case 2: - const quote = quotes[quotes.length] + const quote = quotes[ranInt(0, quotes.length)] if(quote) { await send(quote, "quote") break;