/djs-protofy

A easy way to manage your bot

Primary LanguageTypeScriptApache License 2.0Apache-2.0

📃 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);