aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
751 stars 160 forks source link

voiceStateUpdate event is not including the user(self-bot) him self #207

Closed Naozumi520 closed 2 years ago

Naozumi520 commented 2 years ago

Which package is the feature request for?

The core library

Feature

I'm working on a project Remedy which provide discord voice overlay under macOS and I used the discord event voiceStateUpdate using this package in order to check the connected channel. Someone opened an feature request #4 about adding group chats and private calls support. I've tested and figured out that currently the voiceStateUpdate event is not detecting if the user joined the dm calls or group calls. I hope that you can help me as it's part of issue that this feature should work on selfbot but not bot account (user can now receive calls)

Ideal solution or implementation

I have tested and found out that the current voiceStateUpdate event does not detect if the user joined a dm call or a group call. I hope you can help me as this function may could work on a user account not bot account. It might be an issues that the different abilities between user and bot (users can receive and join these channel types).

Alternative solutions or implementations

No response

Other context

I would appreciate if you could help, thanks!

aiko-chan-ai commented 2 years ago

Which package is the feature request for?

The core library

Feature

I'm working on a project Remedy which provide discord voice overlay under macOS and I used the discord event voiceStateUpdate using this package in order to check the connected channel. Someone opened an feature request #4 about adding group chats and private calls support. I've tested and figured out that currently the voiceStateUpdate event is not detecting if the user joined the dm calls or group calls. I hope that you can help me as it's part of issue that this feature should work on selfbot but not bot account (user can now receive calls)

Ideal solution or implementation

I have tested and found out that the current voiceStateUpdate event does not detect if the user joined a dm call or a group call. I hope you can help me as this function may could work on a user account not bot account. It might be an issues that the different abilities between user and bot (users can receive and join these channel types).

Alternative solutions or implementations

No response

Other context

I would appreciate if you could help, thanks!

have you tried the latest version? I fixed them in the latest version

Naozumi520 commented 2 years ago

Wow it was fast! I updated to version 2.3.76 and it seems detected the bot it self but newState.member return null when I'm trying to connect a dm calls. Other channels still work as usual.

螢幕截圖 2022-07-16 上午1 12 28
 const member = newState.member
 console.log(member?.user) // return null if I joined a dm call
aiko-chan-ai commented 2 years ago

Wow it was fast! I updated to version 2.3.76 and it seems detected the bot it self but newState.member return null when I'm trying to connect a dm calls. Other channels still work as usual.

fixed in v2.3.77 😢 Using .user https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/VoiceState?scrollTo=user

Naozumi520 commented 2 years ago

fixed in v2.3.77 😢 Using .user https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/VoiceState?scrollTo=user

yay! This fixed the issues so well 😆 Thank you for your hardworking! 😇

aiko-chan-ai commented 2 years ago

fixed in v2.3.77 😢 Using .user https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/VoiceState?scrollTo=user

yay! This fixed the issues so well 😆 Thank you for your hardworking! 😇

If you want to update the module from version 2.3.8 or later, there is an option you need to pay attention to https://discordjs-self-v13.netlify.app/#/docs/docs/main/typedef/ClientOptions (DMSync)

image

If you do not make this option (from version 2.3.8 or later) event voiceStateUpdate will not work

Naozumi520 commented 2 years ago

If you want to update the module from version 2.3.8 or later, there is an option you need to pay attention to https://discordjs-self-v13.netlify.app/#/docs/docs/main/typedef/ClientOptions (DMSync)

image

If you do not make this option (from version 2.3.8 or later) event voiceStateUpdate will not work

I see, thank you for reminding me this 😄

Naozumi520 commented 2 years ago

Hmmm 1 more question, I saw your rate limit warning in the option and tried to set DMSync to false, but voiceStateUpdate still working and no more gateway warning in the console XDD. So, should I turn it off for more safety or it's not the correct behavior it should be?

Sorry if I misunderstood the usage of this options and I don't really know what should I really do in here. 😭

螢幕截圖 2022-07-24 上午1 56 05 螢幕截圖 2022-07-24 上午1 56 30
aiko-chan-ai commented 2 years ago

Hmmm 1 more question, I saw your rate limit warning in the option and tried to set DMSync to false, but voiceStateUpdate still working and no more gateway warning in the console. So, ~should I turn it off for safety or it's not the correct behavior?~

螢幕截圖 2022-07-24 上午1 56 05 螢幕截圖 2022-07-24 上午1 56 30

using dmsync will sync to get voice event, i use an account with 100+ dms channel and it was not able to send status update

Naozumi520 commented 2 years ago

using dmsync will sync to get voice event, i use an account with 100+ dms channel and it was not able to send status update

I see, thanks. 😊