djs-protofy
v0.17.5
Published
A library created to make Discord.JS easier to use through prototypes.
Downloads
175
Readme
📃 djs-protofy
A library created to make discord.js easier to use through prototypes.
Links
Requirements
- discord.js version 14 or above
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);