- Auto verify member
- Update Document
This commit is contained in:
March 7th 2022-03-26 19:01:36 +07:00
parent 9997e3db54
commit 8d29c63cb6
4 changed files with 34 additions and 13 deletions

View File

@ -299,9 +299,11 @@ await client.user.setHypeSquad('HOUSE_BALANCE');
```js ```js
await client.fetchInvite('code').then(async invite => { await client.fetchInvite('code').then(async invite => {
await invite.acceptInvite(); await invite.acceptInvite(true);
}); });
``` ```
`invite.acceptInvite(true);` => Auto skip verify screen
<img src= 'https://cdn.discordapp.com/attachments/820557032016969751/957247688666132520/unknown.png'>
</details> </details>
## More features ## More features

View File

@ -16,18 +16,26 @@
- discord.js-selfbot-v13 is a [Node.js](https://nodejs.org) module that allows user accounts 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.
<div align="center">
<p>
<a href="https://www.npmjs.com/package/discord.js-selfbot-v13"><img src="https://img.shields.io/npm/v/discord.js-selfbot-v13.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/discord.js-selfbot-v13"><img src="https://img.shields.io/npm/dt/discord.js-selfbot-v13.svg?maxAge=3600" alt="npm downloads" /></a>
</p>
</div>
### <strong>I don't take any responsibility for blocked Discord accounts that used this module.</strong> ### <strong>I don't take any responsibility for blocked Discord accounts that used this module.</strong>
### <strong>Using this on a user account is prohibited by the [Discord TOS](https://discord.com/terms) and can lead to the account block.</strong> ### <strong>Using this on a user account is prohibited by the [Discord TOS](https://discord.com/terms) and can lead to the account block.</strong>
## Installation ## Installation
**Node.js 16.9.0 or newer is required** **Node.js 16.6.0 or newer is required**
```sh-session ```sh-session
npm install discord.js-selfbot-v13 npm install discord.js-selfbot-v13@latest
``` ```
## Patched ## Patched
Click [here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/DOCUMENT.md) to see the patched functions Click <strong>[here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/DOCUMENT.md)</strong> to see the patched functions
## Example ## Example
```js ```js
@ -35,7 +43,7 @@ const { Client } = require('discord.js-selfbot-v13');
const client = new Client(); // Intents and Partials are already set so you don't have to define them const client = new Client(); // Intents and Partials are already set so you don't have to define them
client.on('ready', async () => { client.on('ready', async () => {
console.log(`${client.user.username} >> [${client.guilds.cache.size}] guilds || [${client.friends.cache.size}] friends`); console.log(`${client.user.username} is ready!`);
}) })
client.login('token'); client.login('token');
@ -53,11 +61,11 @@ window.webpackChunkdiscord_app.push([[Math.random()], {}, (req) => {for (const m
## Selfbot feature ? ## Selfbot feature ?
- Friends and Block Members - Friends and Block Members
- Discord Apps Setting [Theme, Language, ...] - Discord Apps Setting [Theme, Language, HypeSquad, etc.]
- Get Profile GuildMember [Nitro Time, Boost Time, Connected Account, Bio, ...] - Get Profile GuildMember [Nitro Time, Boost Time, Connected Account, Bio, etc.]
- Setting Position Guild and Folder - Setting Position Guild and Folder
- Custom Status and RPC (without button, because it's not working) - Custom Status and RPC (without button, because it's not working)
- Interaction [Button, MessageSelectMenu, ...] - Interaction [Button, MessageSelectMenu, Slash, ContextMenu]
- You can request more features for my module by placing an issue! - You can request more features for my module by placing an issue!
## Links [Discord.js] ## Links [Discord.js]
@ -72,7 +80,7 @@ window.webpackChunkdiscord_app.push([[Math.random()], {}, (req) => {for (const m
- [npm](https://www.npmjs.com/package/discord.js) - [npm](https://www.npmjs.com/package/discord.js)
- [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries) - [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries)
## Contributing ## Contributing [Discord.js]
- Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the - Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation](https://discord.js.org/#/docs). [documentation](https://discord.js.org/#/docs).

View File

@ -316,14 +316,25 @@ class Invite extends Base {
/** /**
* Join this Guild using this invite. * Join this Guild using this invite.
* @returns {Promise<Invite>} * @param {Boolean} autoVerify Whether to automatically verify member
* @returns {Promise<void>}
* @example * @example
* await client.fetchInvite('code').then(async invite => { * await client.fetchInvite('code').then(async invite => {
* await invite.acceptInvite(); * await invite.acceptInvite();
* }); * });
*/ */
async acceptInvite() { async acceptInvite(autoVerify = true) {
return await this.client.api.invite(this.code).post({ versioned: false }); await this.client.api.invites(this.code).post({});
if (autoVerify) {
const getForm = await this.client.api
.guilds(this.guild.id)['member-verification']
.get({ query: { with_guild: false, invite_code: this.code } });
const form = Object.assign(getForm.form_fields[0], { response: true });
// Respond to the form
// https://discord.com/api/v9/guilds/:id/requests/@me
await this.client.api.guilds(this.guild.id).requests['@me'].put({ data: { form_fields: [form] } });
}
return void 0;
} }
} }

2
typings/index.d.ts vendored
View File

@ -1430,7 +1430,7 @@ export class Invite extends Base {
public delete(reason?: string): Promise<Invite>; public delete(reason?: string): Promise<Invite>;
public toJSON(): unknown; public toJSON(): unknown;
public toString(): string; public toString(): string;
public acceptInvite(): Promise<Invite>; public acceptInvite(autoVerify?: Boolean<true>): Promise<void>;
public static INVITES_PATTERN: RegExp; public static INVITES_PATTERN: RegExp;
public stageInstance: InviteStageInstance | null; public stageInstance: InviteStageInstance | null;
public guildScheduledEvent: GuildScheduledEvent | null; public guildScheduledEvent: GuildScheduledEvent | null;