Skip to content

Commit

Permalink
Fix Notifying System
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyou-Izumi committed Mar 19, 2024
1 parent 7d0c078 commit 44d4c9a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ process.on("SIGINT", async () => {
log("Captcha Image Found!", "i");
const imageUrl = message.attachments.first()?.url
if(!imageUrl) throw new Error("Could Not Retrieve Captcha Image URL")
const answer = await solveCaptcha(imageUrl) as string | undefined
const answer = await solveCaptcha(message.client, imageUrl) as string | undefined
if(!answer || /\d/.test(answer)) throw new Error(answer ? `Captcha Solving Returns Invalid Answer: ${answer}` : "Could Not Retrieve Captcha Answer")
const owo = message.client.users.cache.get(global.owoID)
if(!owo?.dmChannel) await owo?.createDM()
Expand All @@ -96,7 +96,7 @@ process.on("SIGINT", async () => {
} else if(/(https?:\/\/[^\s]+)/g.test(message.content)) {
log("HCaptcha Link Found!", "i")
throw new Error("Due to NoCaptchaAI's non-response, This Feature is Not Available Yet!")
await solveCaptcha()
await solveCaptcha(message.client)
} else throw new Error("Captcha Message Found but Got No Image/Link")
selfbotNotify(message)
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-owo-selfbot",
"version": "2.2.7",
"version": "2.2.8",
"description": "Ain't the best OwO Tool Farm, but worth a try (why not?)",
"type": "module",
"exports": "./dist/index.js",
Expand Down
22 changes: 14 additions & 8 deletions src/Extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,30 @@ const commandHandler = async () => {
return commands
}

const reloadPresence = (client:discord.Client) => {
const reloadPresence = async (client:discord.Client) => {
const getExternalURL = await discord.RichPresence.getExternal(
client,
"367827983903490050",
"https://i.imgur.com/9wrvM38.png",
"https://i.imgur.com/MscNx02.png"
)
const activity = new discord.RichPresence()
.setApplicationId("817229550684471297")
.setApplicationId("367827983903490050")
.setType("PLAYING")
.setName("I AM ETERNITYYY")
.setDetails("Simply fulfilling my duties")
.setStartTimestamp(new Date(global.startTime))
.setAssetsLargeImage("mp:attachments/1112736530243522740/1134462426956435546/9wrvM38.png")
.setStartTimestamp(client.readyAt!)
.setAssetsLargeImage(getExternalURL[0].external_asset_path)
.setAssetsLargeText("You Dare Challenge me?")
.setAssetsSmallImage("mp:avatars/749103042581889168/16f85900e27694838e415af9f039953a.webp")
.setAssetsSmallText("BKI Eternity_VN")
.setAssetsSmallImage(getExternalURL[1].external_asset_path)
.setAssetsSmallText("BKI Eternityyy")
.addButton('Github', "https://github.com/LongAKolangle/discord-owo-selfbot")
.addButton('Youtube', "https://youtube.com/@EternityNqu")
.addButton('Youtube', "https://www.youtube.com/@daongotau")
client.user?.setActivity(activity.toJSON())
client.user?.setStatus("idle")
}

const solveCaptcha = async (url?:string, huntbotCaptcha = false) => {
const solveCaptcha = async (client: discord.Client, url?:string, huntbotCaptcha = false) => {
if(url && !huntbotCaptcha) {
const response = await axios.get(url, {
responseType: "arraybuffer",
Expand Down
2 changes: 1 addition & 1 deletion src/SelfbotWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const aHuntbot = async () => {
log(`Huntbot Will Arrive/Re-check in: ${timeHandler(Date.now(), timeoutHuntbot)}`, "i")
return;
}
const answer = await solveCaptcha(msg.attachments.first()?.url) as string | undefined
const answer = await solveCaptcha(msg.client, msg.attachments.first()?.url) as string | undefined
if(!answer || !/^\w{5}$/.test(answer)) {
timeoutHuntbot = new Date().setMinutes(new Date().getMinutes() + 10, new Date().getMinutes() + ranInt(10, 50))
throw new Error(answer ? `Huntbot Captcha Solving Returns Invalid Answer: ${answer}` : "Could Not Retrieve Huntbot Captcha Answer")
Expand Down

0 comments on commit 44d4c9a

Please sign in to comment.