Client.spread() - shysolocup/noscord.js GitHub Wiki
spreads out data over another directory if you want to have commands in a separate folder spread tasks are stored in Client.spreads and they're ran when the client logs in |
|
|
JS (index.js) |
client.spread("src/commands"); |
JS (src/commands/ping.js) |
module.exports = (client) => {
client.import("commands", "app", "components");
commands.create("ping", "replies with pong", (ctx) => {
let timestamp = new Timestamp();
let embed = new Embed({
header: "Pong!",
timestamp: timestamp.embed,
color: app.colors.blurple,
footer: `latency: ${timestamp.latency(ctx)}ms`
});
ctx.reply({ embeds: [embed] });
});
} |