G
G
getaxe2022-02-20 18:36:10
JavaScript
getaxe, 2022-02-20 18:36:10

How not to get a bot banned for "spam in PM"?

Hello, straight to the point. Faced the problem of writing to people in HP.
A long time ago, when I was just starting to study ds js, I did, let's say, for a test, through the for of loop, reading server members and writing to them in PM. After that, the bot (its token) fell into a timeout, felts were banned, and did not fully understand.

Now there is a need to send a message to people who bought a role/room that the subscription period is coming to an end and they need to renew the role/room if they want to continue using it. All information about these people and their subscriptions is stored in a json file, which is updated at midnight (00:00) every day, and compares the current day with the day recorded in the file, after which the CYCLE (I don’t know how else) writes to people, the deadline whose subscriptions are expiring on that day.

But when writing, I remembered my not the most pleasant experience with the ban of tokens, and now I'm thinking how to write the code so that the bot is not banned. Is there any information somewhere about how the bot behaves with discord when performing this kind of action.

ps I UNDERSTAND that I'm not going to spam anyone in PM, and why spam people from your server.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question