Features

Features are useful if you want to load all the files in a specific folder!

Examples

JavaScript
TypeScript
CoffeeScript
JavaScript
// Imagine you need 2 guildMemberRemove events
module.exports = (client) => {
client.on("guildMemberRemove", (member) => {
console.log(member.user.tag);
});
};
TypeScript
// Imagine you need 2 guildMemberRemove events
import { Client } from "discord.js";
export default (client: Client) => {
/* you can import Client from
discord.js and change the any type to Client */
client.on("guildMemberRemove", (member: any) => {
console.log(member.user!.tag);
});
};
CoffeeScript
# Imagine you need 2 guildMemberRemove events
module.exports = (client) ->
client.on("guildMemberRemove", (member) ->
console.log(member.user.tag);
);