djs-protofy
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

📃 djs-protofy

A library created to make discord.js easier to use through prototypes.

djs-protofy Supported DJS Version

Links

Requirements

Installation

npm i djs-protofy
yarn add djs-protofy
pnpm i djs-protofy

How to use

Import djs-protofy/init into the main file.

// ES5
require("djs-protofy/init");

// ES6
import "djs-protofy/init";

Examples

Getting a user

client.users.cache.get(string); // Instead of
client.users.getById(string); // Do it

Getting a voice channel by a user

// Instead of
client.channels.cache.find((channel) => {
  if (!channel.isVoiceBased()) return false;
  return channel.members.has(string);
});

// Do it
client.channels.getVoiceByUserId(string);

/djs-protofy/

    Package Sidebar

    Install

    npm i djs-protofy

    Weekly Downloads

    10

    Version

    0.10.0

    License

    Apache-2.0

    Unpacked Size

    431 kB

    Total Files

    194

    Last publish

    Collaborators

    • gorniaky
    • rodycouto