How to use the eris.Collection function in eris

To help you get started, we’ve selected a few eris examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AugustArchive / Maika / rewrite / core / provider.js View on Github external
constructor(table, { id = 'guildID', data } = {}) {
        this.table = table;
        this.columns = {
            id,
            data
        };
        this.items = new Collection();
    }
github AugustArchive / Maika / src / structures / plugin.js View on Github external
constructor(options) {
        this.name = options.name;
        this.visible = options.visible;
        this.embeded = options.embeded;
        this.enabled = options.enabled;
        /** @type {Collection} */
        this.commands = new Collection();

        for (let i = 0; i < options.commands.length; i++)
            this.commands.set(options.commands[i].command, options.commands[i]);
    }
github tt-bot-dev / tt.bot / lib / extensions / API / VoiceChannel.js View on Github external
get: function () {
                const coll = new Collection(Member);
                channel.voiceMembers.forEach(m => coll.add(m));
                return coll;
            },
            configurable: true
github AugustArchive / Maika / old / core / managers / command-manager.js View on Github external
constructor(client) {
        this.client = client;
        /** @type {Collection} */
        this.commands = new Collection();
        this.processor = new CommandProcessor(client);
    }
github AugustArchive / Maika / src / core / internal / plugin.js View on Github external
constructor(info) {
        this.name = info.name;
        this.description = info.description;
        this.visible = info.visible || true;
        /** @type {Collection} */
        this.commands = new Collection();
        this.file = null;
        this.disabled = info.disabled || false;

        info.commands.forEach((command) => {
            if (command.disabled)
                return;

            if (this.commands.has(command.command))
                return;

            this.commands.set(command.command, new Command(command));
        });
    }
github tt-bot-dev / tt.bot / lib / extensions / API / Guild.js View on Github external
get: function () {
                const coll = new Collection(Member);
                guild.members.forEach(m => {
                    coll.add(new Member(extension, m));
                })
                return coll;
            },
            configurable: true
github tt-bot-dev / tt.bot / lib / extensions / API / TextChannel.js View on Github external
get: function () {
                const coll = new Collection(Message);
                channel.messages.forEach(m => coll.add(new Message(extension, m)));
                return coll;
            },
            configurable: true
github tt-bot-dev / tt.bot / lib / extensions / API / CategoryChannel.js View on Github external
get: function () {
                const coll = new Collection(Channel);
                channel.channels.forEach(c => {
                    if (c instanceof tc) coll.add(new TextChannel(extension, c));
                    if (c instanceof vc) coll.add(new VoiceChannel(extension, c));
                });
                return coll;
            }
        })
github AugustArchive / Maika / src / structures / registry / plugins.js View on Github external
constructor(bot) {
        this.bot = bot;
        /** @type {Collection} */
        this.plugins = new Collection();
    }
github tt-bot-dev / tt.bot / lib / extensions / API / Guild.js View on Github external
get: function () {
                const coll = new Collection(Channel);
                guild.channels.forEach(c => {
                    let ch = class {};
                    if (ch instanceof tc) ch = TextChannel;
                    else if (ch instanceof vc) ch = VoiceChannel;
                    else if (ch instanceof cc) ch = CategoryChannel;
                    coll.add(new ch(extension, c));
                });
                return coll;
            }
        })