A library created to make discord.js easier to use through prototypes.
- discord.js version 14 or above
npm i djs-protofy
yarn add djs-protofy
pnpm i djs-protofy
Import djs-protofy/init
into the main file.
// ES5
require("djs-protofy/init");
// ES6
import "djs-protofy/init";
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);