discord.js-collectordeprecated

Library to easily create message collector and reactions on discord, with customization ways

Usage no npm install needed!

<script type="module">
  import discordJsCollector from 'https://cdn.skypack.dev/discord.js-collector';
</script>

README

downloads-npm-total downloads-npm-week dependencies-deprecated-status npm-version

Discord.js-collector

Library to easily create message collector, reactions collector and reactions role on discord.js v12, with customization ways.


Sumary

◘ Reactions Collectors:
| Reaction Role
| Menu
| Question
| Yes/No Question
| Embeds Paginator
◘ Messages Collectors:
| Question
| Async Question
◘ Examples
| Reaction Role Manager
| Reaction Menu
◘ Others
| Changelog
| Breaking Changes

Warning

Please update your version to: ^1.8.0, multiple bugfixs and vulnerabilities.
See all Breaking Changes.

Discord Server

For more fast support, please join in us discord server invite here

Documentation

See all documentation of last version here


Reaction role

You can create reactions roles, with amazing functions:
| • If you bot turns off, when it turns on all users reacted in messages will win the role.
| • If you bot turns off, if any user remove reaction, when the bot turns on will remove the role from him.
| • You can store the roles in a JSON file and migrate the reaction role data.
| • You can limit max roles given by bot, like 10 roles.
| • Toggled roles: Limit one of these roles to use (Util for colors reaction roles, only get one of roles)
| • Requirements: Limit roles to only boosters or discord developers win roles!
| • Just Win: you can configure a role to just give to member if him react on it!
| • Just Lose: you can configure a role to just take from member if him react on it!
| • Reversed: When react on it, member will lose the role. When take off reaction of it, member will win the role.

Reaction Role Gif

You can find this code example here


Reaction menu

To create a reaction menu with multiple pages.

Menu Gif

You can find this code example here

Simple reaction collector

To use in multiple actions, react and then trigger one function to do things.

Question Gif

Simple boolean reaction collector

To use in if statements, the asynchronous reaction collector returning Promise is more practical

Question Gif

Embeds pagination

Example here

Easier paginator embeds, with back/skip reaction to change current page.

Question Gif

You can find this code example here

Simple messages collector

Await for messages from user, and when it's send will fire a trigger to do things. See exemple [here]

You can find this code example here

Question Gif

Async message collector

Await for message from user, and when user send, will return user message as Promise.

Question Gif

const { MessageCollector } = require("discord.js-collector");

const botMessage = await message.channel.send("Awaiting a message");
const userMessage = await MessageCollector.asyncQuestion({
  botMessage,
  user: message.author.id,
});
if (userMessage.content === "ping") {
  await message.channel.send("pong!");
}