feat(Document): Update

This commit is contained in:
March 7th 2022-06-16 12:34:03 +07:00
parent 3bd4966d53
commit e045e60fb0
8 changed files with 33 additions and 60 deletions

View File

@ -1,26 +0,0 @@
# Discord.js Selfbot v13
- Install: <strong>```npm i discord.js-selfbot-v13@latest```</strong>
# Document is available
I made it pretty sketchy, but you can see it in the Wiki tab and [here](https://discordjs-self-v13.netlify.app/)
# <strong>[Risky actions](https://github.com/Merubokkusu/Discord-S.C.U.M/issues/66)</strong>
# Quick links (Example Codes)
- [<strong>ClientOption</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/ClientOption.md)
- [<strong>HTTPOption</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/HTTPOption.md)
- [<strong>Guild</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md)
- [<strong>Message</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Message.md)
- [<strong>User</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md)
- [<strong>Call</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/VoiceCall.md)
- [<strong>API</strong>](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/API.md)
## More features
<details open>
<summary><strong>Click to show</strong></summary>
- I need requests from you! Ask questions, I will help you!
</details>
## Warning
- This is a beta version, so there are some bugs.
- If you use the `Client.destroy()` function, for an account that uses 2FA, it will cause a logout and the Token will no longer be usable.

View File

@ -0,0 +1 @@
update soon ~

View File

@ -75,13 +75,13 @@ await message.contextMenu(botID, commandName);
<summary>Issue ?</summary>
- It has some minor bugs.
> DiscordAPIError [20012] You are not authorized to perform this action on this application
>
> Fix it: creating 1 DMs with bot
>
> In this way, all Slash commands can be obtained
- <strong>Now to get more secure interaction commands you need to use guild.searchInteraction() (using gateway)</strong>
- With REST: update soon.
```js
DiscordAPIError [20012] You are not authorized to perform this action on this application
Fix it: creating 1 DMs with bot
In this way, all Slash commands can be obtained
```
- With Gateway guild.searchInteraction() (using gateway)
- With REST: Working ! [TextBasedChannel.sendSlash()].
</details>
## MessageEmbed ?

View File

@ -58,5 +58,9 @@ await message.channel.sendSlash('718642000898818048', 'sauce', a)
![image](https://user-images.githubusercontent.com/71698422/173347075-5c8a1347-3845-489e-956b-63975911b6e0.png)
# Events (Update soon)
# Events
- [interactionCreate](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionCreate)
- [interactionFailure](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionFailure)
- [interactionSuccess](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionSuccess)
- [interactionModalCreate](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionModalCreate)

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,7 @@ class InteractionCreateAction extends Action {
/**
* Emitted when an interaction is created.
* @event Client#interactionCreate
* @param {Interaction} interaction The interaction which was created
* @param {InteractionResponseBody | Interaction} interaction The interaction which was created.
*/
client.emit(Events.INTERACTION_CREATE, interaction);

View File

@ -9,9 +9,5 @@ const { Events } = require('../../../util/Constants');
module.exports = (client, packet) => {
if (client.user.bot) client.actions.InteractionCreate.handle(packet.d);
/**
* Emitted whenever client user send interaction
* @event Client#interactionSuccess
* @param {InteractionResponseBody} data InteractionResponseBody
*/ else client.emit(Events.INTERACTION_CREATE, packet.d);
else client.emit(Events.INTERACTION_CREATE, packet.d);
};

View File

@ -188,24 +188,22 @@ exports.Status = {
};
exports.Opcodes = {
DISPATCH: 0, // # Receive dispatches an event
HEARTBEAT: 1, // # Send/Receive used for ping checking
IDENTIFY: 2, // # Send used for client handshake
STATUS_UPDATE: 3, // # Send used to update the client status
VOICE_STATE_UPDATE: 4, // # Send used to join/move/leave voice channels
VOICE_GUILD_PING: 5, // # Send used for voice ping checking
RESUME: 6, // # Send used to resume a closed connection
RECONNECT: 7, // # Receive used to tell when to reconnect (sometimes...)
REQUEST_GUILD_MEMBERS: 8, // # Send used to request guild members (when searching for members in the search bar of a guild)
INVALID_SESSION: 9, // # Receive used to notify client they have an invalid session id
HELLO: 10, // # Receive sent immediately after connecting, contains heartbeat and server debug information
HEARTBEAT_ACK: 11, // # Sent immediately following a client heartbeat that was received
GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
/** Add some opcode from Discum
/* @see https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
*/
DM_UPDATE: 13, // # Send used to get dm features
LAZY_REQUEST: 14, // # Send discord responds back with GUILD_MEMBER_LIST_UPDATE type SYNC...
DISPATCH: 0, // # Receive => dispatches an event
HEARTBEAT: 1, // # Send/Receive => used for ping checking
IDENTIFY: 2, // # Send => used for client handshake
STATUS_UPDATE: 3, // # Send => used to update the client status
VOICE_STATE_UPDATE: 4, // # Send => used to join/move/leave voice channels
VOICE_GUILD_PING: 5, // # Send => used for voice ping checking
RESUME: 6, // # Send => used to resume a closed connection
RECONNECT: 7, // # Receive => used to tell when to reconnect (sometimes...)
REQUEST_GUILD_MEMBERS: 8, // # Send => used to request guild members (when searching for members in the search bar of a guild)
INVALID_SESSION: 9, // # Receive => used to notify client they have an invalid session id
HELLO: 10, // # Receive => sent immediately after connecting, contains heartbeat and server debug information
HEARTBEAT_ACK: 11, // # Sent => immediately following a client heartbeat that was received
GUILD_SYNC: 12, // # Receive => guild_sync but not used anymore
// Add some opcode from Discum: https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
DM_UPDATE: 13, // # Send => used to get dm features
LAZY_REQUEST: 14, // # Send => discord responds back with GUILD_MEMBER_LIST_UPDATE type SYNC...
LOBBY_CONNECT: 15,
LOBBY_DISCONNECT: 16,
LOBBY_VOICE_STATE_UPDATE: 17, // # Receive
@ -214,7 +212,7 @@ exports.Opcodes = {
STREAM_WATCH: 20,
STREAM_PING: 21, // # Send
STREAM_SET_PAUSED: 22,
REQUEST_APPLICATION_COMMANDS: 24, // # Send request application/bot cmds (user, message, and slash cmds)
REQUEST_APPLICATION_COMMANDS: 24, // # Send => request application/bot cmds (user, message, and slash cmds)
};
exports.Events = {