How do add a user to a thread silently?

My discord bot currently adds people to a thread like this:
await threadChannel.members.add(userID);
await threadChannel.members.add(userID);
But this results in the following message (at bottom). How do I stop this from happening? Or alternatively, how do I delete this message once it has already appeared?
No description
8 Replies
d.js toolkit
d.js toolkit4w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
treble/luna
treble/luna4w ago
i dont think its possible to delete that message
Zamiel
ZamielOP4w ago
Well, not quite true. You can simply mention/ping the person, then delete the message afterward. Right. So the difference between this and the method I posted in the OP is that it generates a ping instead of just simply an unread message. But it still adds them to the thread silently. By "silently" I meant for other users of the forum/thread. Obviously, the user is going to be notified either way, whether that is from an unread message or a (higher severity) ping. Negative. I find the pings undesriable, and I want to be added to the thread without a ping. But I also don't want to broadcast to the entire server what is happening. It's going to be happening in every thread, so having the message in EVERY SINGLE THREAD is spammy and prevents my users from getting to the content faster. There's two dimensions of "silently": 1) Silently for the notified user. 2) Silently for other users in the Discord server. I want the second dimension to be completely silent. I want the first dimension to still make a noise, but only a small noise.
Why don’t you want your users know that you‘ve been added to the thread? Since they‘ll also see you in the member list anyway?
Indeed, they would just see me in the member list. But moreover, if the bot adds me to every single thread in the entire Discord server, then it's obvious already that I am in every thread, so having a message that explicitly says it EVERY SINGLE TIME is just spam and is undesirable for them. Ok, not super interested in arguing over the definition of spam, but maybe we could agree that in this case it would be classified as a "superfluous message that is otherwise undesirable".
Zamiel
ZamielOP4w ago
I can confirm this method works just fine.
NyR
NyR4w ago
If your question was to add without pinging the user, there's much better way to do it with allowedMentions options, but your question wasn't that, it was doing it without having any message to prevent "nuisance" to other users, which is indeed not possible
Zamiel
ZamielOP4w ago
there's much better way to do it with allowedMentions options
Can you explain that?
without having any message to prevent "nuisance" to other users, which is indeed not possible
But in the algorithm I posted in my last message, it is possible to delete the message after editing it, which does indeed prevent nuisance to other users.
NyR
NyR4w ago
Okay ig it wouldn't work with setting allowedMentions (maybe because it doesn't actually ping), I was wrong about that, but what you are suggesting is a workaround, albeit one that works
Want results from more Discord servers?
Add your server