-
Notifications
You must be signed in to change notification settings - Fork 0
Client.spread()
github-actions[bot] edited this page Sep 30, 2024
·
14 revisions
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] });
});
} |