Enhanced Collector Module for Discord.js

Overview

djs-extended-collectors

NOT:

  • You can write your suggestions on Discord.
  • Async Collectors is coming soon.

Why djs-extended-collectors?

  • TypeScript Support(Full).
  • More Collectors.
  • Extended Discord.js Collectors.
  • Useful & Basic.

Not:

  • Discord.js v14 or fever required

Dependencies:

  • discord.js: 14.6.0
  • colorette: 2.0.19
  • rexar-tools: 2.7.0
  • typed-emitter: 2.1.0

Classes

  • MessageCollector
  • ApplicationCommandCollector
  • Base Collector(this is a base)

1.2.0

  • fixed bugges
  • removed discord.js version controller

Using

Importing

CommonJS(CJS)

const DjsExtendedCollectors = require("djs-extended-collectors")

ESModule(ESM)

import DjsExtendedCollectors from "djs-extended-collectors";
//or
const DjsExtendedCollectors = await import("djs-extended-collectors").then(m => m.default)

Typescript(TS)

import DjsExtendedCollectors from "djs-extended-collectors";

Using

const client = new Discord.Client({
    intents: [Object.values(Intents)]//activate all intents
})


//Interaction Collectors.
client.on("interactionCreate", async(interaction) => {
    if(interaction.isCommand()){
        //application command collector
        if(interaction.commandName === "basic-yes-no"){
            const cmdCollector = new DjsExtendedCollectors.ApplicationCommandCollector(client, interaction.channel, {
                filter: (int) => {
                    int.user.id === interaction.user.id
                },
                disposeFilter: (int) => {
                    int.commandName === "test"
                }
            })
            cmdCollector.on("collect", (intr) => {
                if(intr.commandName === "yes"){
                    console.log(`${intr.user.username} say yes`)
                }
                if(intr.commandName === "no"){
                    console.log(`${intr.user.username} say no`)
                }
            })
        }
    }
})
//Message Collector.
client.on("messageCreate", async(m) => {
    if(m.content === "sync-message-collector"){
        const testMessage = await m.channel.send("collected last message: any")
        const collector = new DjsExtendedCollectors.MessageCollector(client, message.channel, {
            time: 30000
        })
        collector.on("collect", (item) => {
            testMessage.edit("collected last message: " + item.content)
        })
        collector.on("update", (oldMessage, newMessage) => {
            testMessage.edit(oldMessage.content + " is edited to " + newMessage.content)
        })
    }
})



client.login("your bot's token")

Contact and Support

Discord

You might also like...

Cyrus is a Discord Bot with focus on Fun, Moderation, information and much more commands! Made it with Discord.js

Cyrus is a Discord Bot with focus on Fun, Moderation, information and much more commands! Made it with Discord.js

Cyrus Cyrus is a Discord Bot with focus on Fun, Moderation, information and much more commands! Made it with Discord.js Invite : Click here Vote : Top

Nov 4, 2022

OptiBOT - My discord.js V13 discord bot.

OptiBOT Just a discord.js v13 bot for my discord server. if you plan to use this bot for your server, dont. This i made this bot just for learning js

Jan 3, 2022

Discord.JTS - Slash Commands for Discord.JS 13 using Typescript

Installation Requirements and Recommendations: Node.js Git Visual Studo Code An empty test Discord server Step 0: Login into Discord in the Browser Go

Jan 13, 2022

A discord bot using @discord.js and mongoose. Used for music, moderation, and entertainment.

hazel A discord bot using @discord.js and mongoose. Used for music, moderation, and entertainment. Features Music ― supporting YouTube, Spotify and So

Nov 17, 2022

For Help/Questions Join in discord: https://discord.gg/ErynDxTV5Y

C-GEN-Discord-Alt-Accounts-Generator An Open Source Account Generator Bot! How it works: Put your Discord Bot Token in Config, Make sure you have Node

May 8, 2022

This bot is a cool Discord bot made in discord.js using Node.JS

This bot is a cool Discord bot made in discord.js using Node.JS

Anti-Crosspost Discord Bot This bot is a cool Discord bot made in discord.js using Node.JS. It detects when a user cross-posts a message in multiple c

May 31, 2022

Denky is a multipurpose Discord bot, build with Node.js, TypeScript and discord.js.

🤖 Denky Bot Denky is a brazilian Discord bot, build with Node.js, TypeScript and discord.js. ⚙️ How to Create a Discord application. Guide Install No

Apr 6, 2022

Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot that handles all your server needs.

Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot that handles all your server needs.

Welcome to Co-Pilot Bot repo! 👋 🤖 Co-Pilot (All-in-one Discord Bot) Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot

Nov 11, 2022

Sample discord bot using clashofclans.js and discord.js

Clash of Clans sample discord bot using NodeJs Introduction This sample bot project aims to help you get started with interacting Clash of Clans API u

Nov 19, 2022
Owner
Davut Özgür Süküti
Advanced error creator XD
Davut Özgür Süküti
Discord-Bot - You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have published on my youtube channel.

Discord-Bot You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have publishe

Umut Bayraktar 110 Nov 24, 2022
Discord Neura - a Discord bot framework built on discord.js

Discord Neura Description Discord Neura is a Discord bot framework built on discord.js. Features Command Handler, Arguments, Preconditions and Listene

Discord Neura 3 Mar 23, 2022
Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total contributions.

Remoklify - Gitlift Discord Bot Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total

Remoklify 3 Mar 20, 2022
A discord bot made using discord.js and discord-player

Musx A custom discord bot that can play music in your server ?? Add the bot to your server If you are looking for a music bot for your Discord server

Shashwat Singh 4 Mar 28, 2022
About Discord bot draft that does not contain ready-made commands, compatible with discord.js v14. Create your own discord bot with this command handler.

discordJS-V14 About Discord bot draft that does not contain ready-made commands, compatible with discord.js v14. Create your own discord bot with this

Umut Bayraktar 24 Nov 17, 2022
dscbots.js is a Node.js module that allows you to interact with the Discord API without any complications.

Credits Goodsie - Helping me with the websocketmanager About dscbots.js is a Node.js module that allows you to interact with the Discord API without a

Scarlot Spy 5 Nov 9, 2022
⚡ Discord bot with economy, gambling, music, fun, moderation features based on discord.js v12

Crucian Crucian is my discord bot with simple structure based on discord.js Click Here to invite Crucian to your server Author Crucian © Apoo Authored

apoow3b 3 Jul 26, 2021
A multipurpose Discord-bot created using discord.js.

Flame A multipurpose Discord-bot with music, economy, utils, and also auto-moderation. Flame is a powerfull, multipurpose and fully modular Discord-bo

Flame 38 Nov 14, 2021
An simple package to create an Activity in Discord Voice Channel using Discord.js

discordjs-activity An simple package to create an Activity in Discord Voice Channel using Discord.js ?? | Installation npm install discordjs-activity

Sudhan 55 Nov 15, 2022
best discord selfbot with discord.js-selfbot npm

Discord-Afk-Selfbot best discord selfbot with discord.js-selfbot npm How to start the Bot step by step : Step 1 ===> Open a CMD the npm init step 2 ==

Mani-MBn 5 Aug 18, 2022