From 8e92d3a444fb41562ef0989c7cc1580195abf4b3 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:07:37 +0700 Subject: [PATCH] remove 3 --- Document/API.md | 93 ------------------------------------ Document/DiscordClientRPC.md | 18 ------- Document/Guild.md | 87 --------------------------------- 3 files changed, 198 deletions(-) delete mode 100644 Document/API.md delete mode 100644 Document/DiscordClientRPC.md delete mode 100644 Document/Guild.md diff --git a/Document/API.md b/Document/API.md deleted file mode 100644 index da72ee4..00000000 --- a/Document/API.md +++ /dev/null @@ -1,93 +0,0 @@ -# Extending Discord.js-selfbot-v13 -> `credit: Discum` - -How to add extra API wraps to Discord.js-selfbot-v13? -# Table of Contents -- [HTTP APIs](#HTTP-APIs) -- [Gateway APIs](#Gateway-APIs) - -### HTTP APIs: - -```js -URL example: -'https://discord.com/api/v9/users/@me' -const url = client.api.users['@me']; -/* Method: GET | POST | PUT | PATCH | DELETE */ -Option: -#1 -query: Object - -- example: https://discord.com/api/v9/users/@me?abc=123&xyz=ok (GET) - -client.api.users['@me'].get({ - query: { - abc: 123, - xyz: 'ok', - } -}); - -#2 - -body + files: Object + Array --> 'content-type': FormData (POST) - -#3 - -data: Object --> 'content-type': 'application/json' - -... - -``` - - -###### GET: -```js -await client.api.users['@me'].get({ versioned: true }); -/* Request: https://discord.com/api/v9/users/@me */ -await client.api.users['@me'].get({ versioned: false }); -/* Request: https://discord.com/api/users/@me */ -``` -###### POST: -```js -await client.api.channels[channel.id].messages.post({ versioned: true, data: {}, files: [] }); -/* Request: https://discord.com/api/v9/channels/{channel.id}/messages */ -``` -###### PUT: -```js -await client.api - .guilds(guild.id) - .bans(user.id) - .put({ - versioned: true, - data: {}, - }); -/* Request: https://discord.com/api/guilds/{guild.id}/bans/{user.id} */ -``` -###### PATCH: -```js -await client.api.users['@me'].patch({ versioned: true, data: {} }); -/* Request: https://discord.com/api/v9/users/@me */ -``` -###### DELETE: -```js -await client.api.hypesquad.online.delete({ versioned: true }); -/* Request: https://discord.com/api/v9/hypesquad/online */ -``` -### Gateway APIs -You need to send data to the port and listen for an event. This is quite complicated but if you want to use an existing event, here are the instructions - -###### SEND: -```js -const { Constants } = require('discord.js-selfbot-v13'); -// Global gateway (example update presence) -client.ws.broadcast({ - op: Constants.Opcodes.STATUS_UPDATE, - d: {}, -}); -// Guild gateway (example get all members) -guild.shard.send({ - op: Constants.Opcodes.REQUEST_GUILD_MEMBERS, - d: {}, -}); -``` \ No newline at end of file diff --git a/Document/DiscordClientRPC.md b/Document/DiscordClientRPC.md deleted file mode 100644 index eeadf37..00000000 --- a/Document/DiscordClientRPC.md +++ /dev/null @@ -1,18 +0,0 @@ -## Discord's local RPC servers (~ discord app) - -```js -const { Client, RichPresence, DiscordRPCServer } = require('discord.js-selfbot-v13'); - -const client = new Client(); - -client.once('ready', async () => { - const server = await new DiscordRPCServer(client, false) - server.on('activity', async data => { - if (!data.activity) return; - const activity = new RichPresence(client, data.activity); - client.user.setActivity(activity); - }); -}); - -client.login('token'); -``` \ No newline at end of file diff --git a/Document/Guild.md b/Document/Guild.md deleted file mode 100644 index 1617e2b..00000000 --- a/Document/Guild.md +++ /dev/null @@ -1,87 +0,0 @@ -# Quick Links: -- [Set Guild Folder and Position](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md#discord-guild-set-position) -- [DM group](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md#group-dm) -- [Join Guild](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md#join-guild-using-invite) -- [Community](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md#set-community) - -## Discord Guild set position -
-Click to show - -Code: -```js -guild.setPosition(position, type, folderID); -// Position: The guild's index in the directory or out of the directory -// Type: -// + 'FOLDER': Move guild to folder -// + 'HOME': Move the guild out of the directory -// FolderID: The folder's ID , if you want to move the guild to a folder -``` -Response -```js -Guild {} -``` -
- -## Group DM -
-Click to show - -Code: -```js -/* Create */ -const memberAdd = [ - client.users.cache.get('id1'), - client.users.cache.get('id2'), - ... - client.users.cache.get('id9') -] -// Max member add to Group: 9, Min: 2 -await client.channels.createGroupDM(memberAdd); -/* Edit */ -const groupDM = client.channels.cache.get('id'); -await groupDM.setName('New Name'); -await groupDM.setIcon('iconURL'); -await groupDM.getInvite(); -await groupDM.fetchInvite(); -await groupDM.removeInvite(invite); -await groupDM.addMember(user); -await groupDM.removeMember(user); -/* Text Channel not Bulk delete */ -await groupDM.send('Hello World'); -await groupDM.delete(); // Leave -/* Voice Channel */ -await groupDM.call() -``` - -
- - -## Join Guild using Invite -
-Click to show - -```js -await client.fetchInvite('code').then(async invite => { - await invite.acceptInvite(true); -}); -``` -`invite.acceptInvite(true);` => Auto skip verify screen - - - -But if you are blocked by HCaptcha, this will not work -
- -## Set Community -
-Click to show - -```js -await guild.setCommunity(stats: boolean, publicUpdatesChannel: TextChannelResolvable, rulesChannel: TextChannelResolvable, reason?: string): Promise; -// Enable with default -await guild.setCommunity(true); -// Disable -await guild.setCommunity(false); -``` -