From cc0bf46a3ee9833fdd5e04fc811ebb9796dc8683 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 21 May 2022 21:14:59 +0700 Subject: [PATCH] update document --- Document/DOCUMENT.md | 5 +++-- Document/Guild.md | 8 ++++---- Document/Message.md | 14 +++++++------- Document/User.md | 10 +++++----- Document/VoiceCall.md | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 18 deletions(-) create mode 100644 Document/VoiceCall.md diff --git a/Document/DOCUMENT.md b/Document/DOCUMENT.md index e478d91..e9cbe81 100644 --- a/Document/DOCUMENT.md +++ b/Document/DOCUMENT.md @@ -5,17 +5,18 @@ I made it pretty sketchy, but you can see it in the Wiki tab and [here](https://www.discordjs-self-v13.cf/) # [Risky actions](https://github.com/Merubokkusu/Discord-S.C.U.M/issues/66) -# Quick links +# Quick links (Example Codes) - [ClientOption](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/ClientOption.md) - [HTTPOption](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/HTTPOption.md) - [Guild](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Guild.md) - [Message](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Message.md) - [User](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md) +- [Call](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/VoiceCall.md) - [API](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/API.md) ## More features -
+
Click to show - I need requests from you! Ask questions, I will help you!
diff --git a/Document/Guild.md b/Document/Guild.md index 88523f4..8c71af8 100644 --- a/Document/Guild.md +++ b/Document/Guild.md @@ -5,7 +5,7 @@ - [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: @@ -24,7 +24,7 @@ Guild {}
## Group DM -
+
Click to show Code: @@ -56,7 +56,7 @@ await groupDM.delete(); // Leave ## Join Guild using Invite -
+
Click to show ```js @@ -72,7 +72,7 @@ await client.fetchInvite('code').then(async invite => {
## Set Community -
+
Click to show ```js diff --git a/Document/Message.md b/Document/Message.md index 4773d71..f588c58 100644 --- a/Document/Message.md +++ b/Document/Message.md @@ -3,7 +3,7 @@ - [Embed](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Message.md#messageembed-) ## Interaction -
+
Fetch Commands data ```js @@ -27,7 +27,7 @@ await bot.applications.fetch( ); ```
-
+
Button Click ```js @@ -36,7 +36,7 @@ await Button.click(Message); // Message has button (v1) await message.clickButton(buttonID); // Message has button (v2) ```
-
+
Message Select Menu ```js @@ -46,7 +46,7 @@ await message.selectMenu(menuID, options) // If message has >= 2 menu await message.selectMenu(options) // If message has 1 menu ```
-
+
Slash Command ```js @@ -61,7 +61,7 @@ await Channel.sendSlash(botID, commandName, ['sub command', 'option1', 'option2' // => await Channel.sendSlash(botID, 'role', ['add', '12345678987654321', '98765432123456789']); ```
-
+
Message Context Command ```js @@ -70,7 +70,7 @@ await Channel.sendSlash(botID, commandName, ['sub command', 'option1', 'option2' await message.contextMenu(botID, commandName); ```
-
+
Issue ? - It has some minor bugs. @@ -87,7 +87,7 @@ await message.contextMenu(botID, commandName); ## MessageEmbed ? - Because Discord has removed the ability to send Embeds in its API, that means MessageEmbed is unusable. But I have created a constructor that uses oEmbed with help [from this site](https://www.reddit.com/r/discordapp/comments/82p8i6/a_basic_tutorial_on_how_to_get_the_most_out_of/) -
+
Click to show diff --git a/Document/User.md b/Document/User.md index 6df0121..4b751e6 100644 --- a/Document/User.md +++ b/Document/User.md @@ -6,7 +6,7 @@ - [Other](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md#user--clientuser-method) ## User Settings -
+
Click to show ```js @@ -61,7 +61,7 @@ client.setting.setCustomStatus();
## Discord User Info -
+
Click to show Code: @@ -96,7 +96,7 @@ User {
## Discord User Friend / Blocked -
+
Click to show Code: @@ -137,7 +137,7 @@ User { ## Custom Status and RPC -
+
Click to show Custom Status @@ -267,7 +267,7 @@ And you can change the status 5 times every 20 seconds!
## User & ClientUser Method -
+
Click to show ```js diff --git a/Document/VoiceCall.md b/Document/VoiceCall.md new file mode 100644 index 00000000..9dbaae0 --- /dev/null +++ b/Document/VoiceCall.md @@ -0,0 +1,41 @@ +# Setup +- Before you use it, properly initialize the module (`@discordjs/voice` patch) + +```js +new Client({ + patchVoice: true, // Enable default +}) +``` + +# Usage: Call DM / Group DM + +```js +const dmChannel = client.channels.cache.get('id'); +/* or +const dmChannel = User.dmChannel || await User.createDM(); +*/ +const connection = await dmChannel.call(); +/* Return @discordjs/voice VoiceConnection */ +``` + +# Play Music using `play-dl` + +```js +const connection = await message.member.user.dmChannel.call(); +const play = require('play-dl'); +const { + createAudioPlayer, + createAudioResource, +} = require('@discordjs/voice'); +let stream = await play.stream('youtube link'); +let resource = createAudioResource(stream.stream, { + inputType: stream.type, +}); +let player = createAudioPlayer({ + behaviors: { + noSubscriber: NoSubscriberBehavior.Play, + }, +}); +player.play(resource); +connection.subscribe(player); +```