Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selfbot DM Problem #178

Closed
3 tasks done
ByLife opened this issue Jun 24, 2022 · 24 comments
Closed
3 tasks done

Selfbot DM Problem #178

ByLife opened this issue Jun 24, 2022 · 24 comments
Labels
bug Something isn't working Fixed ok it's working

Comments

@ByLife
Copy link

ByLife commented Jun 24, 2022

Issue description

Hi, I'm trying to make a DM ALL, only issue is that
it does send a message to the user when you have at least one message already sent to him.

If you don't have at least one message sent by you ( manually ) with the person, It will open the DM but send nothing (even with a setTimeout())

Code sample

async function dmEveryone(message, toDM) {
	let members = await message.guild.members.fetch({ force: true });
	for (const [key, value] of members.entries()) {
		message.guild.members.cache.get(key).send("Test").catch(() => console.log("error"))
	  }
}

Package version

Newest

Node.js version

16.9.1

Operating system

Windows

Priority this issue should have

Low (slightly annoying)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@ByLife ByLife added the bug Something isn't working label Jun 24, 2022
@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

toDM parameter is not used by the way

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

I saw a method called createDM, do we need to use that ?

@aiko-chan-ai
Copy link
Owner

Pls try

async function dmEveryone(message, toDM) {
	let members = await message.guild.members.fetch({ force: true });
	for (const [key, value] of members.entries()) {
		await value
		.send("Test")
		.catch(() => console.log("error"))
	  }
}

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

image

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

Still doesn't work :/

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

PS: The users are mine and their DM are open

@aiko-chan-ai
Copy link
Owner

 async function dmEveryone(message, toDM) {
	let members = await message.guild.members.fetch({ force: true });
	for (const [key, value] of members.entries()) {
	    let channel = value.user.dmChannel;
	    if (!channel) {
	      channel =  await value.user.createDM(true) 
	    }
		await channel
		.send("Test")
		.catch(() => console.log("error"))
	  }
}

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

image
image

image

It does send a message to the users that It has at least one message with but no with users that he doesn't have at least one DM

And the last code still doesn't work, weird

@aiko-chan-ai
Copy link
Owner

I will fix it tomorrow :sad:

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

Ok, thank you ! ^^

Maybe coming from the gateway ????

@aiko-chan-ai
Copy link
Owner

Wdym :?

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

You are using a gateway right to send a message to the user ( exemple:
discord.com/@id/user/
With a header like: { token: auth, message: "Test" } )

Anyway, when you fixed it, can you tell me when it's done ( not going to close the issue if you want to respond here when you fixed it ).

Thank you a lot again!

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

And sorry for my broken english, I'm french, hope you don't hate us 😂
Merci !

@aiko-chan-ai
Copy link
Owner

i think i will fix it soon (currently 00:45 where i live)

@ByLife
Copy link
Author

ByLife commented Jun 24, 2022

Oh, sorry then, not going to disturb you more, have a good night if you go to sleep !

@aiko-chan-ai
Copy link
Owner

I fixed it, please update @ByLife

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

Let's see 🥂

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

image

It is half working good, does send a message to this user:

image

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

And this user is on the same server, DM open only never messaged him before

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

Weird right ?

@aiko-chan-ai
Copy link
Owner

And this user is on the same server, DM open only never messaged him before

I don't think it's because the library is faulty, because I tested it and it works correctly

maybe that user turned off this mode
image

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

This user is mine and he has it turned on, but it's ok ;)

@aiko-chan-ai
Copy link
Owner

This user is mine and he has it turned on, but it's ok ;)

problem solved?

@ByLife
Copy link
Author

ByLife commented Jun 25, 2022

No but it's ok, not going to annoy you more

@aiko-chan-ai aiko-chan-ai added the Fixed ok it's working label Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed ok it's working
Projects
None yet
Development

No branches or pull requests

2 participants