new Method

- message.clickButton()
- message.selectMenu()
This commit is contained in:
March 7th 2022-03-27 19:05:43 +07:00
parent 609ac391f4
commit fba0c875e0
4 changed files with 1040 additions and 927 deletions

View File

@ -230,18 +230,22 @@ And you can change the status 5 times every 20 seconds!
## Interaction
<details>
<summary>Button Click (v1)</summary>
<summary>Button Click</summary>
```js
await Button.click(Message); // Message has button
await Button.click(Message); // Message has button (v1)
//
await message.clickButton(buttonID); // Message has button (v2)
```
</details>
<details>
<summary>Message Select Menu (v1)</summary>
<summary>Message Select Menu</summary>
```js
await MessageSelectMenu.select(Message, value); // Message has menu
await MessageSelectMenu.select(Message, options); // Message has menu (v1)
// value: ['value1', 'value2' , ...]
await message.selectMenu(menuID, options) // If message has >= 2 menu
await message.selectMenu(options) // If message has 1 menu
```
</details>
<details>
@ -261,6 +265,7 @@ messageID: Message.id,
await command.sendSlashCommand(Message, ['option1', 'option2']);
// Eg: Slash /add role:123456789 user:987654321
// value: ['123456789', '987654321']
// Channel.sendSlashCommand(botID, commandName, options): Comming soon !
```
</details>
<details>
@ -279,6 +284,7 @@ messageID: Message.id,
author: Message.author,
*/
await command.sendContextMenu(Message);
// Channel.sendContextMenu(botID, commandName): Comming soon !
```
</details>

View File

@ -1,6 +1,6 @@
{
"name": "discord.js-selfbot-v13",
"version": "1.1.5",
"version": "1.1.6",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js",
"types": "./typings/index.d.ts",

File diff suppressed because it is too large Load Diff

3
typings/index.d.ts vendored
View File

@ -1578,6 +1578,9 @@ export class Message<Cached extends boolean = boolean> extends Base {
public toString(): string;
public unpin(): Promise<Message>;
public inGuild(): this is Message<true> & this;
// Added
public clickButton(buttonID: String<MessageButton.customId>): Promise<pending>
public selectMenu(menuID: String<MessageSelectMenu.customId> | Array<options>, options: Array<String>): Promise<pending>
}
export class MessageActionRow extends BaseMessageComponent {