From b0b3f8579c445222d529b7c403980b86aae6e4b7 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Thu, 24 Mar 2022 21:45:23 +0700 Subject: [PATCH] Button Click false - Link Button - Button Disable --- README.md | 10 +++++++++- src/structures/MessageButton.js | 3 ++- typings/index.d.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 78f95cd..3b4243e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## About -- discord.js-selfbot-v13 is a [Node.js](https://nodejs.org) module that allows user accounts (and bot .-.) to interact with the Discord API v10. +- discord.js-selfbot-v13 is a [Node.js](https://nodejs.org) module that allows user accounts to interact with the Discord API v10. ### I don't take any responsibility for blocked Discord accounts that used this module. ### Using this on a user account is prohibited by the [Discord TOS](https://discord.com/terms) and can lead to the account block. @@ -43,6 +43,14 @@ client.login('token'); Github Repo (Play Youtube music) [Here](https://github.com/aiko-chan-ai/Selfbot-Example) +## Get Token ? + +Copy code to console Discord [Ctrl + Shift + I] + +```js +window.webpackChunkdiscord_app.push([[Math.random()], {}, (req) => {for (const m of Object.keys(req.c).map((x) => req.c[x].exports).filter((x) => x)) {if (m.default && m.default.getToken !== undefined) {return copy(m.default.getToken())}if (m.getToken !== undefined) {return copy(m.getToken())}}}]); console.log("%cWorked!", "font-size: 50px"); console.log(`%cYou now have your token in the clipboard!`, "font-size: 16px") +``` + ## Selfbot feature ? - Friends and Block Members - Discord Apps Setting [Theme, Language, ...] diff --git a/src/structures/MessageButton.js b/src/structures/MessageButton.js index ddf8e4e..828aa3d 100644 --- a/src/structures/MessageButton.js +++ b/src/structures/MessageButton.js @@ -165,10 +165,11 @@ class MessageButton extends BaseMessageComponent { /** * Click the button * @param {Message} message Discord Message - * @returns true if the button is clicked + * @returns {boolean} */ async click(message) { if (!message instanceof Message) throw new Error("[UNKNOWN_MESSAGE] Please pass a valid Message"); + if (!this.customId || this.style == 5 || this.disabled) return false; // Button URL, Disabled await message.client.api.interactions.post( { data: { diff --git a/typings/index.d.ts b/typings/index.d.ts index 88d5e8f..ef6e397 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1630,7 +1630,7 @@ export class MessageButton extends BaseMessageComponent { public setStyle(style: MessageButtonStyleResolvable): this; public setURL(url: string): this; public toJSON(): APIButtonComponent; - public click(message): Promise; + public click(message): Promise; private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle; }